Export (0) Print
Expand All

Sites.ExportWeb method

Exports a Web site.

Namespace:  WebSvcsites
Assembly:  STSSOAP (in STSSOAP.dll)

[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/ExportWeb", RequestNamespace = "http://schemas.microsoft.com/sharepoint/soap/", 
	ResponseNamespace = "http://schemas.microsoft.com/sharepoint/soap/", 
	Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public int ExportWeb(
	string jobName,
	string webUrl,
	string dataPath,
	bool includeSubwebs,
	bool includeUserSecurity,
	bool overWrite,
	int cabSize
)

Parameters

jobName
Type: System.String

The file name to use for content migration packages.

webUrl
Type: System.String

The URL of the site to export.

dataPath
Type: System.String

The directory location where content migration packages are placed.

includeSubwebs
Type: System.Boolean

true to include subwebs; otherwise, false.

includeUserSecurity
Type: System.Boolean

true to include site security groups and group membership information; otherwise, false.

overWrite
Type: System.Boolean

true to overwrite the content migration package if it exists; otherwise, false.

cabSize
Type: System.Int32

Indicates the maximum size for the CMP (content migration package) file.

Return value

Type: System.Int32

To access the Sites service and its methods, set a Web reference to http://Server_Name/[sites/][Site_Name/]_vti_bin/Sites.asmx.

SOAP Request Format   Following is a sample SOAP 1.1 request. Replace the placeholders shown need with actual values.

POST /_vti_bin/sites.asmx HTTP/1.1
Host: ServerName
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://schemas.microsoft.com/sharepoint/soap/ExportWeb"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ExportWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/">
      <jobName>string</jobName>
      <webUrl>string</webUrl>
      <dataPath>string</dataPath>
      <includeSubwebs>boolean</includeSubwebs>
      <includeUserSecurity>boolean</includeUserSecurity>
      <overWrite>boolean</overWrite>
      <cabSize>int</cabSize>
    </ExportWeb>
  </soap:Body>
</soap:Envelope>

SOAP Response Format   Following is a sample SOAP 1.1 response. Replace the placeholders shown with actual return values.

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ExportWebResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
      <ExportWebResult>int</ExportWebResult>
    </ExportWebResponse>
  </soap:Body>
</soap:Envelope>

Community Additions

ADD
Show:
© 2014 Microsoft