SWsoft SiteBuilder Integration API v3.2 Reference

SiteWebService.CreateSiteWithHost Method 

 [This is preliminary documentation and subject to change.]

Create host, add host to a user Plan, create a site with standard FTP publishing scenario on the newly created host

[C#]
public SiteValue CreateSiteWithHost(
   string username,
   string alias,
   string ipAddress,
   string publishUsername,
   string publishPassword,
   string publishWorkingDirectory,
   string publishWebSiteUrl
);

Parameters

username
Username of a site owner
alias
Site alias
ipAddress
Host address (only IP format)
publishUsername
Publishing settings user name
publishPassword
Publishing settings password
publishWorkingDirectory
Publishing settings working directory
publishWebSiteUrl
The address the web site is available after publication

Return Value

Value object of a created site

Remarks

  1. Create a host with the specified address for a user specified by SOAP-header CredentialsSoapHeader. If a host with such address already exists, then it will be used at the following steps.
  2. Add a host to a Plan selected for a user specified by username.
  3. Create a site for a user specified by username with the publishing settings set as standard FTP publishing scenario on the host received at the first step and other publishing settings supplied by appropriate parameters (publishUsername, publishPassword, publishWorkingDirectorypublishWebSiteUrl).

Example SOAP 1.1

Request
POST /ServiceFacade/version_3_2/SiteWebService.asmx HTTP/1.1
Host: sitebuilder.swsoft.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://swsoft.com/SiteBuilder/SiteService/v_3_2/CreateSiteWithHost"

<?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:Header>
    <CredentialsSoapHeader xmlns="http://swsoft.com/SiteBuilder/SiteService/v_3_2">
      <Login>string</Login>
      <Password>string</Password>
    </CredentialsSoapHeader>
  </soap:Header>
  <soap:Body>
    <CreateSiteWithHost xmlns="http://swsoft.com/SiteBuilder/SiteService/v_3_2">
      <username>string</username>
      <alias>string</alias>
      <ipAddress>string</ipAddress>
      <publishUsername>string</publishUsername>
      <publishPassword>string</publishPassword>
      <publishWorkingDirectory>string</publishWorkingDirectory>
      <publishWebSiteUrl>string</publishWebSiteUrl>
    </CreateSiteWithHost>
  </soap:Body>
</soap:Envelope>
Response
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>
    <CreateSiteWithHostResponse xmlns="http://swsoft.com/SiteBuilder/SiteService/v_3_2">
      <CreateSiteWithHostResult>
        <Id>string</Id>
        <Alias>string</Alias>
        <OwnerId>string</OwnerId>
        <OwnerUserName>string</OwnerUserName>
        <IsActive>boolean</IsActive>
        <PublishingSettings>
          <Id>string</Id>
          <StandardLocation>
            <Address>string</Address>
            <UserName>string</UserName>
            <Password>string</Password>
            <WorkingDirectory>string</WorkingDirectory>
            <WebSiteUrl>string</WebSiteUrl>
            <IsAnonymous>boolean</IsAnonymous>
            <Veid>long</Veid>
            <VerifyStatus>Unverified or LocationError or UnknownError or StaticOnly or Dynamic</VerifyStatus>
            <LastVerifyAttempt>dateTime</LastVerifyAttempt>
          </StandardLocation>
          <FtpLocation>
            <Address>string</Address>
            <UserName>string</UserName>
            <Password>string</Password>
            <WorkingDirectory>string</WorkingDirectory>
            <WebSiteUrl>string</WebSiteUrl>
            <IsAnonymous>boolean</IsAnonymous>
            <Veid>long</Veid>
            <VerifyStatus>Unverified or LocationError or UnknownError or StaticOnly or Dynamic</VerifyStatus>
            <LastVerifyAttempt>dateTime</LastVerifyAttempt>
          </FtpLocation>
          <Mode>XCopy or Ftp or Vps</Mode>
          <Scenario>Standard or FreeSwsoftHosting or AnyFtp</Scenario>
        </PublishingSettings>
        <LastPublishingSettings>
          <Id>string</Id>
          <StandardLocation>
            <Address>string</Address>
            <UserName>string</UserName>
            <Password>string</Password>
            <WorkingDirectory>string</WorkingDirectory>
            <WebSiteUrl>string</WebSiteUrl>
            <IsAnonymous>boolean</IsAnonymous>
            <Veid>long</Veid>
            <VerifyStatus>Unverified or LocationError or UnknownError or StaticOnly or Dynamic</VerifyStatus>
            <LastVerifyAttempt>dateTime</LastVerifyAttempt>
          </StandardLocation>
          <FtpLocation>
            <Address>string</Address>
            <UserName>string</UserName>
            <Password>string</Password>
            <WorkingDirectory>string</WorkingDirectory>
            <WebSiteUrl>string</WebSiteUrl>
            <IsAnonymous>boolean</IsAnonymous>
            <Veid>long</Veid>
            <VerifyStatus>Unverified or LocationError or UnknownError or StaticOnly or Dynamic</VerifyStatus>
            <LastVerifyAttempt>dateTime</LastVerifyAttempt>
          </FtpLocation>
          <Mode>XCopy or Ftp or Vps</Mode>
          <Scenario>Standard or FreeSwsoftHosting or AnyFtp</Scenario>
        </LastPublishingSettings>
        <HostId>string</HostId>
        <ResellerId>string</ResellerId>
        <ResellerUserName>string</ResellerUserName>
        <CreationDate>dateTime</CreationDate>
      </CreateSiteWithHostResult>
    </CreateSiteWithHostResponse>
  </soap:Body>
</soap:Envelope>

See Also

SiteWebService Web Service | Web services