4.1 CreateSite

The following example demonstrates the protocol client requests and protocol server responses from the Administration Web Service Protocol to create a site collection.

The protocol client sends a CreateSite request to create a site collection.

 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <CreateSite xmlns="http://schemas.microsoft.com/sharepoint/soap/">
       <Url>http://server/sites/examplesite</Url>
       <Title>ExampleSite</Title>
       <Description>ExampleSite description </Description>
       <Lcid>1033</Lcid>
       <WebTemplate>STS#0</WebTemplate>
       <OwnerLogin>domain\username</OwnerLogin>
       <OwnerName>owner name</OwnerName>
       <OwnerEmail>someone@microsoft.com</OwnerEmail>
       <PortalUrl />
       <PortalName />
     </CreateSite>
   </soap:Body>
 </soap:Envelope>

The protocol server creates the site collection and responds as follows:

 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <CreateSiteResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
       <CreateSiteResult>http://server/sites/examplesite</CreateSiteResult>
     </CreateSiteResponse>
   </soap:Body>
 </soap:Envelope>