SWsoft SiteBuilder Integration API v3.2 Reference

HostWebService.CreateHost Method 

 [This is preliminary documentation and subject to change.]

Add a new host

[C#]
public HostValue CreateHost(
   string hostName,
   string hostAddress,
   string SMTPHost,
   int SMTPPort,
   string SMTPFrom,
   string SMTPUser,
   string SMTPPassword
);

Parameters

hostName
Host name. Can't be null or empty.
hostAddress
Host address. Can't be null or empty. Supported address formats: format of System.Net.IPAddress.Parse() and format of System.Net.Dns.GetHostEntry(string)
SMTPHost
SMTP server host
SMTPPort
SMTP server port
SMTPFrom
SMTP from address
SMTPUser
SMTP server login
SMTPPassword
SMTP server password

Return Value

Value object of created host

Example SOAP 1.1

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

<?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/HostService/v_3_2">
      <Login>string</Login>
      <Password>string</Password>
    </CredentialsSoapHeader>
  </soap:Header>
  <soap:Body>
    <CreateHost xmlns="http://swsoft.com/SiteBuilder/HostService/v_3_2">
      <hostName>string</hostName>
      <hostAddress>string</hostAddress>
      <SMTPHost>string</SMTPHost>
      <SMTPPort>int</SMTPPort>
      <SMTPFrom>string</SMTPFrom>
      <SMTPUser>string</SMTPUser>
      <SMTPPassword>string</SMTPPassword>
    </CreateHost>
  </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>
    <CreateHostResponse xmlns="http://swsoft.com/SiteBuilder/HostService/v_3_2">
      <CreateHostResult>
        <Id>string</Id>
        <Name>string</Name>
        <Address>string</Address>
        <IsActive>boolean</IsActive>
        <SmtpFrom>string</SmtpFrom>
        <SmtpHost>string</SmtpHost>
        <SmtpPassword>string</SmtpPassword>
        <SmtpUser>string</SmtpUser>
        <SmtpPort>int</SmtpPort>
      </CreateHostResult>
    </CreateHostResponse>
  </soap:Body>
</soap:Envelope>

See Also

HostWebService Web Service | Web services