Creating sub-sites using WebService
by Shantha Kumar • April 25, 2009 • SharePoint, WebService • 1 Comment
I noticed in MSDN forums, many of them are struggling with creation of sub-sites using webservice in sharepoint.
I take a look on that, Because they are all try to use CreatSite method in Admin webservice. But that will help only on creating SiteCollections.
Then how we can create a susite? It’s very easy if you are look in to Meetings webservice. This will have a CreateWorkspace method.
URL for Meetings webservice: ~site/_vti_bin/meetings.asmx
Syntax :
CreateWorkspace([Site Title],[Site Template],[LCID],[TimeZone Information]);
Sample Code:
MeetingWebService.Meetings WMService = new MeetingWebService.Meetings(); MeetingWebService.TimeZoneInf tz = new MeetingWebService.TimeZoneInf(); XmlNode xnode= WMService.CreateWorkspace(“sitename”, “STS#0″, 1033, tz);
:) Cheers guys


Hi,
I’m trying to create a subsite using CreateWorkspace of the Meetings web service just as you indicate but with javascript and no matter what I do the site created is ALWAYS based on the standard meetings template and does not seem to be use the site template specified in the SOAP request – I’ve tried the standard templates like in your example “STS#0″ and user generated templates stored in the site template library “mytestteplate.stp” but always with the same result – a standard meeting subsite.
any idea what might be going wrong?
thanks