HostWebService.FindHosts Method 

Search for hosts specified by search criteria and type.

[C#]
public TotalListOfHostValue FindHosts(
   string criteria,
   int pos,
   int count,
   SortType sortType,
   SortDirection sortDirection,
   HostType type
);

Parameters

criteria
Search criteria.
pos
Start position.
count
Maximum number of records to return.
sortType
Field/expression to sort by (see SortType).
sortDirection
Sort direction (see SortDirection).
type
Hosts filter (see HostType).

Return Value

A TotalList`1 that contains HostValue objects retrieved by search.

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/FindHosts"

<?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>
    <FindHosts xmlns="http://swsoft.com/webservices/sb/4.0/HostService">
      <criteria>string</criteria>
      <pos>int</pos>
      <count>int</count>
      <sortType>Name or Address or Owner or Active</sortType>
      <sortDirection>Ascending or Descending</sortDirection>
      <type>All or Personal or Delegate or Existent</type>
    </FindHosts>
  </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>
    <FindHostsResponse xmlns="http://swsoft.com/webservices/sb/4.0/HostService">
      <FindHostsResult>
        <TotalCount>int</TotalCount>
        <Items>
          <HostValue>
            <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>
          </HostValue>
          <HostValue>
            <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>
          </HostValue>
        </Items>
      </FindHostsResult>
    </FindHostsResponse>
  </soap:Body>
</soap:Envelope>

See Also

HostWebService Web Service | Web services