HostWebService.CreateHost Method 

Adds new host to the host pool.

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

Parameters

hostName
Host name. This field cannot be null or empty.
hostAddress
Host address. This field cannot be null or empty Supported formats: System.Net.IPAddress.Parse() and System.Net.Dns.GetHostEntry(string).
SMTPHost
SMTP server host name.
SMTPPort
SMTP server port.
SMTPFrom
Sender e-mail address.
SMTPUser
SMTP server login.
SMTPPassword
SMTP server password.

Return Value

HostValue object.

Example SOAP 1.1

Request
POST /wsb/ServiceFacade/4.0/HostWebService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://swsoft.com/webservices/sb/4.0/HostService/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/webservices/sb/4.0/HostService">
      <SsoSessionId>string</SsoSessionId>
      <SsoId>string</SsoId>
      <Login>string</Login>
      <Password>string</Password>
    </CredentialsSoapHeader>
  </soap:Header>
  <soap:Body>
    <CreateHost xmlns="http://swsoft.com/webservices/sb/4.0/HostService">
      <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/webservices/sb/4.0/HostService">
      <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