다음을 통해 공유


Sites.ExportWeb Method

Exports a Web site.

Namespace:  [Sites Web service]
Web service reference: http://Site/_vti_bin/Sites.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/ExportWeb", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function ExportWeb ( _
    jobName As String, _
    webUrl As String, _
    dataPath As String, _
    includeSubwebs As Boolean, _
    includeUserSecurity As Boolean, _
    overWrite As Boolean, _
    cabSize As Integer _
) As Integer
'Usage
Dim instance As Sites
Dim jobName As String
Dim webUrl As String
Dim dataPath As String
Dim includeSubwebs As Boolean
Dim includeUserSecurity As Boolean
Dim overWrite As Boolean
Dim cabSize As Integer
Dim returnValue As Integer

returnValue = instance.ExportWeb(jobName, _
    webUrl, dataPath, includeSubwebs, _
    includeUserSecurity, overWrite, _
    cabSize)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/ExportWeb", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/", 
    ResponseNamespace = "https://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.

  • 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

Remarks

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

Examples

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: "https://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="https://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ExportWeb xmlns="https://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="https://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ExportWebResponse xmlns="https://schemas.microsoft.com/sharepoint/soap/">
      <ExportWebResult>int</ExportWebResult>
    </ExportWebResponse>
  </soap:Body>
</soap:Envelope>

See Also

Reference

Sites Class

Sites Members

Sites Web Service