R – How to get list of Sites and lists from Sharepoint using Web Services

sharepoint-2007

I want to get list of Sites and Lists from Sharepoint using Web Services.

Worked on GetSite() and GetSiteAndWeb() functions of SiteData web service

Also tried Site and Lists.

I am unable to get list of sites.

Best Answer

You want the Webs.GetWebCollection method from the Webs Web Service.

Webs.GetWebCollection

When working through the SharePoint API, the terminology is different than when working in SharePoint itself.

Site Collection (SharePoint) -> Site (SharePoint API)
Site (SharePoint) -> Web (SharePoint API)