| Register
Wednesday, July 23, 2008
SharePoint Web Services
Location: BlogsSharePointing - The Act of Collaborating    
Posted by: Steve Walker 6/7/2006

I had a question posed to me on how to access SharePoint through web services. Specifically, they needed to be able to list all of the web sites that a user is a member of.

For a basic example of how to access the web services , I would recommend downloading and tearing apart Jan Tielens' SharePoint Explorer Application. This winform application allows you to connect to a SharePoint Instance and list all of the sites on the server.

In order to list all of the sites that a user has access to (or is a member of) you would have to iterate through the sites, checking the membership using a call to the permissions service (after retrieving the list of sites).

Here is a Reference Article that lines out talking to SharePoint Web Services pretty well. Just remember, if you can't do what you want through the existing services but can accomplish it throug hthe API, its very easy to write your own web servcie that simply makes calls into the API on the server side.

This would not be a very performant solution IMHO (would take a long time to iterate through each site checking membership. If you do take this approach, i would look at caching the results somewhere to avoid latency issues. especially if this were an application with many users. This would be a perfect application of AJAX as your web part could retrieve the lists client side so the page would load first :-)

The next version of SharePoint makes this much simpler (and has this capability built right in). They way they accomplosh it is by running a service on a schedule to compile the lists of sie meberships, etc.. similar to the way the existing audience compilation works in SPS 2003.

Hope that helps !

Permalink |  Trackback
(c) 2006 SharePoint Forums   |  Privacy Statement  |  Terms Of Use