views:

138

answers:

1

I have a bit of challenge. Knowing only the basic URL for the sharepoint installation, can I get a list of the site collections that have been created using only the basic web services that are installed?

Using the Webs web service or the SiteData web service I've been able to get information on the default site collection that's at the base URL (http://MySharePointServer/). I can also get a full list of sites below the site collection and a description of the site collection itself but I can't seem to get any info on the other site collections under the same web application.

Any help would be appreciated, I thought it would be a piece of cake to get the info.

+2  A: 

Unfortunately, no. That functionality isn't available from the out-of-the-box web services. The only option that might work is using the Search Web Service (I'm not familiar enough with it to know).

This walkthrough describes how to add your own custom web services to the product. I strongly recommend this approach as it's very likely there will be other missing functionality you will need to add - if not now, in the near future.

Alex Angas
Thanks for the reply. The Search Web Service also provides the information about the default Site Collection alone.
Nagendra
Alex is right (of course), a custom web service is the only way to accomplish this. From this webservice, you would call SPContext.Current.Site.WebApplication to get the SPWebApplication, then use the SPWebApplication.Sites property to enumerate through the site collections.
Paul-Jan
Thank you for your response.
Nagendra