reserveUsns()

UsnList reserveUsns(int sid, int count)

This method reserves subscription USNs in Smile that can be used for ordering later.

Parameters

sid
Format: integer
Purpose: Specifies the service from where the prefix and suffix would apply to the returned USNs.
count
Format: integer
Purpose: Specifies how many USNs should be returned.
The default maximum is 10,000. The default can be changed by setting the system property com.inomial.smile.api.impl.OrderBean.MaxUsnCount. Cannot be bigger than 2,147,483,647. Negative value is not allowed.

Results

This method returns a UsnList XML document that contains a list of the reserved USNs.

There are no messages defined by this method.

Example: A returned UsnList XML document

This example shows a UsnList XML document listing ten USNs that have been reserved.

<UsnList>
  <Usn>2143826226</Usn>
  <Usn>2143826234</Usn>
  <Usn>2143826242</Usn>
  <Usn>2143826259</Usn>
  <Usn>2143826267</Usn>
  <Usn>2143826275</Usn>
  <Usn>2143826283</Usn>
  <Usn>2143826291</Usn>
  <Usn>2143826309</Usn>
  <Usn>2143826317</Usn>
</UsnList>

Faults

NoSuchItemException

This fault is returned when the service does not exist.

InvalidRequestException

This fault is returned when the count exceeds the limit.

Java client syntax

java -cp build/smilewsv2-client.jar [options]
 com.inomial.smile.client.v2.examples.ReserveUsns sid count
sid
Purpose: Specifies the service from where the prefix and suffix would apply to the returned USNs.
count
Purpose: Specifies how many USNs should be returned.
Note: For more information about the Java client and the options it accepts, see Java client syntax.