380 likes | 681 Views
Canberra SharePoint User Group. May 2009 Tim Kremer – Spyk Software Ishai Sagi – Unique World. Sponsors:. This month. We cover the SharePoint news for the month Tim Kremer talks about using SharePoint web services and his experience related to iShare
E N D
Canberra SharePoint User Group May 2009Tim Kremer – Spyk Software IshaiSagi – Unique World Sponsors:
This month • We cover the SharePoint news for the month • Tim Kremer talks about using SharePoint web services and his experience related to iShare • IshaiSagi briefly covers what was added in Service Pack 2 for SharePoint and some of the potential issues to look for • We give away a wireless Western Digital USB Hard Drive as a door prize!
The headlines • Office Service Pack 2 was released for the server and desktop desktop applications • First Microsoft Certified Masters for SharePoint were announced • Tech.Ed 2009 currently happening in the states – open call for content here in Aus • Preliminary requirements for SP2010 were announced • Check out our FaceBook group http://tinyurl.com/cspugfb
The door prize • Thanks to all our sponsors
The Presentation • Tim KremerSpyk Software“Using SharePoint web services” • IshaiSagiUnique World“Overview of MOSS Service Pack 2”
Overview of SharePoint Service Pack 2 Ishai Sagi UniqueWorld
WSS SP2 http://tinyurl.com/WSS3SP2
What’s New? What’s Fixed? • Performance and Availability Improvements • Service Pack 2 includes many fixes and enhancements designed to improve performance, availability, and stability in your server farms, including: • New Timer job automatically rebuilds content database index to improve database performance. • When a content database is marked as read-only, the user interface will be modified so users cannot perform tasks that require writing to the database. • Performance enhancement across nearly all the components. • Improved Interoperability • Service Pack 2 continues to improve SharePoint interoperability with other products and platforms. • Internet Explorer 8 is added into Level 1 browser support. • FireFox 3.0 is added into Level 2 browser support. (Firefox 2.0 is no longer supported by Mozilla) • Provide improved client integration user experience with Form Based Authentication. Now the client application can store user credentials instead of asking for them every time. • Getting Ready for SharePoint Server 2010 • See new STSADM commands
What’s Fixed? • So much! • In WSS • In MOSS
New STSADM commands • variationsfixuptool:lets farm administrators control and perform operations against variations. • Preupgradecheck: runs rules that are intended to assist administrators in preparing for upgrade. • Enumallwebs: displays the IDs and site map status for all site collections and subsites in the content database. • Variationsfixuptool: lets an administrator control the different versions—or variations—of a publishing site or page. • Listqueryprocessoroptions: displays the current values of the SharePoint Search query processor settings. • Setqueryprocessoroptions: sets the current values of the SharePoint Search query processor settings.
Issues? • Nintex workflows had issues – a patch has been released (build version 10904)http://tinyurl.com/p3oudy (pdf) • Search service failing to start during the configuration wizard. Solution most people did – reset the search service account.http://tinyurl.com/q56c7x • Free SharePoint template from Microsoft cause an “Upgrade object too new” issuehttp://tinyurl.com/cmj693 • SharePoint designer – make sure it is also upgraded to SP2
And now…. Tim Kremer Director of Spyk Software
Leveraging SharePoint Web Services The SharePoint Everywhere Promise
Tim Kremer Director of Spyk Software Current specialisations: SharePoint & iPhone consulting www.twitter.com/TimKremer http://www.spyk.com
Recent SharePoint Projects WorleyParsons Public Websitewww.worleyparsons.com Spyk Public Websitewww.spyk.com iShareSharePoint for iPhonewww.spyk.com/products/iShare
Why use SharePoint Web Services? Rich Clients Rich Web Parts System Integrations
Accessing SharePoint Web Services Service Addresseshttp://<sitepath>/_vti_bin/WebServiceNameHere.asmx WSDL ’ s http://<sitepath>/_vti_bin/WebServiceNameHere.asmx?wsdl
MOSS only web services Source: http://www.obacentral.com/en/Learn/Recommended%20Reading/Using%20SharePoint%20Web%20Services.pdf
Authenticating against SharePoint web services Integrated Security Web_Reference_Folder.Lists listService = new Web_Reference_Folder.Lists(); listService.Credentials= System.Net.CredentialCache.DefaultCredentials; XmlNodelistsNode= listService.GetListCollection(); MessageBox.Show(listsNode.OuterXml); Forms Authentication (using Authentication.asmx) Source: http://www.codeproject.com/KB/sharepoint/SharePointWSAccess.aspx
Code Sample – Forms Authentication // Authenticate Authentication auth = new Authentication(); auth.CookieContainer= new CookieContainer(); LoginResultresult = auth.Login("username", "password"); if (result.ErrorCode == LoginErrorCode.NoError) { // No error, so get the cookies. CookieCollectioncookies = auth.CookieContainer.GetCookies(new Uri(auth.Url)); Cookie authCookie = cookies[result.CookieName]; Lists lists = new Lists(); lists.CookieContainer= new CookieContainer(); lists.CookieContainer.Add(authCookie); lists.GetListCollection(); } Source: http://robgarrett.com/cs/blogs/software/archive/2007/09/18/sharepoint-2007-web-services-and-forms-authentication.aspx
Authenticating against SharePoint web services • No Anonymous Authentication
From Experience Most web services return a huge XML blob (aka node)When it eventually arrives, have fun parsing it. Each web service has its own poorly documented quirksum... Keep trying? Oh the Pain
Create your own Web Services • Create web service and upload to SharePoint Server:Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\ISAPI\ • Web service is then available from mapped virtual directory: http://<site>/vti_bin/NewService.asmx Complete Walkthrough:http://msdn.microsoft.com/en-us/library/ms464040.aspx
Web Services and Firewalls (ISA Server) • Supporting large numbers of customer environments is difficult • Easiest if firewall passes requests and authentication through to SharePoint directly. • Use Alternative Access Mappingse.g. http://public.contoso.com -> http://portal/ • Watch out for Link Translation of paths and port numbers. e.g. http://public.contoso.com:80 -> http://portal:1234
jQuery + SharePoint web services <script type="text/javascript" src="jquery-1.3.2.min.js"></script> <script type="text/javascript"> $(document).ready(function() { GetMap(); varsoapEnv = "<soapenv:Envelopexmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'> \ <soapenv:Body> \ <GetListItemsxmlns='http://schemas.microsoft.com/sharepoint/soap/'> \ <listName>Assets</listName> \ <viewFields> \ <ViewFields> \ <FieldRef Name='Title' /> \ <FieldRef Name='Lat' /> \ <FieldRef Name='Long' /> \ <FieldRef Name='Description' /> \ </ViewFields> \ </viewFields> \ </GetListItems> \ </soapenv:Body> \ </soapenv:Envelope>"; $.ajax({ url: "http://portal.spyk.com/test/Map/_vti_bin/lists.asmx", type: "POST", dataType: "xml", data: soapEnv, complete: processResult, contentType: "text/xml; charset=\"utf-8\"" }); });
Parse returned XML function processResult(xData, status) { $(xData.responseXML).find("z\\:row").each(function() { AddPushpin($(this).attr("ows_Title") ,$(this).attr ("ows_Lat"),$(this).attr("ows_Long"),$(this).attr ("ows_Description")); }); } </script>
Other ways to talk to SharePoint SharePoint & Frontpage RPC protocol e.g. Recommended approach for uploading documents • minimal documentation on MSDNhttp://msdn.microsoft.com/en-us/library/ms448359.aspx
Case Study BrowseSearch Edit iShare – SharePoint for iPhone Browse Sites & Lists Webs.asmxLists.asmx Common methods: GetWebCollection() GetListCollection()
Case Study BrowseSearch Edit Browse List Contents Lists.asmx Common Methods: GetListItems() GetListContentTypes() GetListContentType() GetList() GetListAndView()
Case Study Browse Search Edit Search SPSearch.asmx (WSS)Search.asmx (MOSS) QueryService.Query() QueryService.Status()
Case Study Browse SearchEdit Edit Lists.asmx Common methods: GetContentTypes() GetListContentType() GetList() UpdateListItems()
Case Study Browse SearchEdit Edit Lists.asmx Common methods: GetListItems() GetListContentType() UpdateListItems()
Questions? Spyk Software Pty Ltd Level 20, 201 Sussex St Sydney NSW 2000 tel: +61 2 9006 1173 www.spyk.com
Thank you! Spyk Software Pty Ltd Level 20, 201 Sussex St Sydney NSW 2000 www.spyk.com