Example: Get a subscription

This example demonstrates SOAP envelopes for the get() method in the subscription endpoint. This method searches by USN for a subscription and returns detailed information about a subscription's properties and status.

Example: An envelope for a SOAP request

This SOAP envelope requests information for a subscription with USN 21420930. Note the following points:
  • the endpoint is defined in the URL of the HTTP request and does not appear in the envelope
  • the USN element is in the default namespace
<?xml version="1.0" ?>
<Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
    <get xmlns:="http://xml.inomial.com/smile/2.xsd" xmlns:="http://ws.inomial.com/smile.2">
      <usn>2142420930</usn>
    </get>
  </Body>
</Envelope>

In this guide, the method that corresponds to the SOAP envelope is documented in the following format:

Subscription get(2142420930)

Example: An envelope for a SOAP response

This SOAP envelope contains the information returned for a subscription with USN 21420930.

<?xml version='1.0' encoding='UTF-8'?>
<Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
  <Body>
    <getResponse xmlns:="http://xml.inomial.com/smile/2.xsd" xmlns:="http://ws.inomial.com/smile.2">
      <Subscription>
        <USN>2142420930</USN>
        <SID>16</SID>
        <ServiceName>CAT Access</ServiceName>
        <Parent>1000000008</Parent>
        <Properties>
          <Object>
            <String name="abn"/>
            <String name="billAddress"/>
            <String name="billBuildingName"/>
            <String name="billCountry"/>
            <String name="billFloorNumber"/>
            <String name="billLotNumber"/>
            <String name="billName"/>
            <String name="billNumber"/>
            <String name="billPostCode"/>
            <String name="billPostalDeliveryType"/>
            <String name="billState"/>
            <String name="billSubUnit"/>
            <String name="billSuburb"/>
            <String name="billType"/>
            <String name="comments"/>
            <String name="companyPosition"/>
            <String name="contactFamily"/>
            <String name="contactGiven"/>
            <String name="contactTitle"/>
            <String name="emailAddress"/>
            <String name="fax"/>
            <String name="homePhone"/>
            <String name="jabberAddress"/>
            <String name="mobilePhone"/>
            <String name="name"/>
            <String name="secretAnswer"/>
            <String name="secretQuestion"/>
            <String name="sex"/>
            <String name="streetAddress"/>
            <String name="streetBuildingName"/>
            <String name="streetCountry"/>
            <String name="streetFloorNumber"/>
            <String name="streetLotNumber"/>
            <String name="streetName"/>
            <String name="streetNumber"/>
            <String name="streetPostalDeliveryType"/>
            <String name="streetPostcode"/>
            <String name="streetState"/>
            <String name="streetSubUnit"/>
            <String name="streetSuburb"/>
            <String name="streetType"/>
            <String name="tradingName"/>
            <String name="workPhone"/>
            <String name="username">joe@example.com</String>
            <String name="framedIpAddress"/>
            <String name="framedIpNetmask"/>
            <Integer name="preferredHomeContactTime"/>
            <Integer name="preferredMobileContactTime"/>
            <Integer name="preferredWorkContactTime"/>
            <Boolean name="billPrintName">false</Boolean>
            <Boolean name="streetPrintName">true</Boolean>
            <Timestamp name="dob"/>
          </Object>
        </Properties>
        <ProvisionStatus>Provisioned</ProvisionStatus>
        <SuspendStatus>Active</SuspendStatus>
        <ActivateStatus>Activated</ActivateStatus>
        <EnableStatus>Enabled</EnableStatus>
        <InvoicingCycle>
          <CycleType>Anniversary</CycleType>
          <CycleDay>24</CycleDay>
        </InvoicingCycle>
        <RatingCycle>
          <CycleType>Anniversary</CycleType>
          <CycleDay>24</CycleDay>
        </RatingCycle>
        <Timezone key="19">Australia/Sydney</Timezone>
        <CostCentre key="1">Example cost centre</CostCentre>
      </Subscription>
    </getResponse>
  </Body>
</Envelope>

In this guide, the response contained in the SOAP envelope is documented in the following format:

<Subscription xmlns="http://xml.inomial.com/smile/2.xsd">
  <USN>2142420930</USN>
  <SID>16</SID>
  <ServiceName>CAT Access</ServiceName>
  <Parent> 1000000008</Parent>
  <Properties>
    <Object>
      <String name="username">joe@example.com</String>
      <Boolean name="billPrintName">false</Boolean>
      <Boolean name="streetPrintName">true</Boolean>
    </Object>
  </Properties>   
  <ProvisionStatus>Provisioned</ProvisionStatus>
  <SuspendStatus>Active</SuspendStatus>   
  <ActivateStatus>Activated</ActivateStatus>
  <EnableStatus>Enabled</EnableStatus>
  <InvoicingCycle>
    <CycleType>Anniversary</CycleType>
    <CycleDay>24</CycleDay>
  </InvoicingCycle>
  <RatingCycle>
    <CycleType>Anniversary</CycleType>
    <CycleDay>24</CycleDay>
  </RatingCycle>
  <Timezone key="19">Australia/Sydney</Timezone>
  <CostCentre key="1">Example cost centre</CostCentre>
</Subscription>