createReservation()
PoolReservationLink createReservation(string poolId, string start, string end, LinkType linkType, BackLink backLink)
This method reserves a range of resources from the pool specified, and creates an initial link to the range.
Parameters
- poolId
- Format: string
- start
- Format: string
- end
- Format: string
- linkType
- Format: LinkType XML
- backLink
- Format: BackLink XML
Results
This method returns a PoolReservationLink XML document containing the a link to the new reservation.
There are no messages defined by this method.
Example: A returned PoolReservationLink XML document
This example shows PoolReservationLink XML document containing details of a new temporary reservation of 10,000 numbers starting at 039999.
<PoolReservationLink xmlns="http://xml.inomial.com/smile/2.xsd" xmlns="http://ws.inomial.com/smile.2">
<LinkId>c71e5fb9-f467-41a7-aa6e-d82d4ce7f7c6</LinkId>
<LinkType>Temporary</LinkType>
<Reservation>
<ReservationId>732b30ff-824b-4a0e-9eea-691e280f2d5e</ReservationId>
<Start>0399990000</Start>
<End>0399999999</End>
</Reservation>
<Expiry>2015-02-08T14:47:52.163+11:00</Expiry>
</PoolReservationLink>
Faults
InvalidRequestExceptionThis fault is returned when a required field is not specified, linkType is invalid, or start and/or end are invalid.
NoSuchItemExceptionThis fault is returned when one of the referenced objects does not exist
This fault is returned when any of the desired resources are already reserved.
Java client syntax
java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.CreateReservation poolId start
end filename [backLinkType] [backLinkKey]
- poolId
- Purpose: Specifies the identifier of the pool from which to reserve.
- start
- Purpose: Specifies the first resource of the range to reserve.
- end
- Purpose: Specifies the last resource of the range to reserve (inclusive).
- filename
- Purpose: Defines the filename of the LinkType XML document.
- backLinkType
- Purpose: (Optional) Specifies a unique string representing the type of object that is holding the reference.
- backLinkKey
- Purpose: (Optional) Specifies a string uniquely identifying object that is holding the reference, within the scope of the backLinkType.
Note: For more information about the Java client and the options it
accepts, see Java client syntax.