getSubserviceBySubserviceUsername()

getSubserviceBySubserviceUsername(int sid, string subserviceUsername)

This method retrieves a subservice that is linked to a particular service, identified by unique service (SID) and subservice username.

Parameters

sid
Format: integer
Purpose: Specifies the service ID that the requested subservice belongs to.
subserviceUsername
Format: string
Purpose: Specifies the username of the subservice for which information is required.

Results

This method returns a Subservice object with information of the requested subservice.

There are no messages defined by this method.

Example: A returned Subservice XML document

This example shows a Subservice XML document.

<Subservice xmlns="http://xml.inomial.com/smile/2.xsd">
  <SSID>2344</SSID>
  <SubscriptionUSN>9796932323</SubscriptionUSN>
  <Active>true</Active>
  <SubserviceUsername>joe@example.com</SubserviceUsername>
  <Object>
    <String name="type">emailAlias</String>
    <String name="forwardTo">john_smith@example.com</String>
  </Object>
</Subservice>

Faults

NoSuchItemException

This fault is returned when the service ID (SID) provided does not correspond to an existing service or no subservices matching the given username exist for the specified service.

TooManyResultsException

This fault is returned when there is more than one subservice with the same given username. This can be the case if the service does not perform uniqueness checks on subservice usernames.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.GetSubserviceBySubserviceUsername
 sid subserviceUsername
sid
Purpose: Specifies the service ID.
subserviceUsername
Purpose: Specifies the username of the subservice.
Note: For more information about the Java client and the options it accepts, see Java client syntax.