search()
PoolSearchResults search(PoolSearchCriteria criteria)
This method performs a search for available resources that can be reserved across a pool.
Parameters
- criteria
- Format: PoolSearchCriteria XML
Example: A PoolSearchCriteria XML document
This example shows a PoolSearchCriteria XML document searching for a range of 10,000 numbers, starting from 039997000, with a maximum of 3 results to be returned.
A PoolSearchCriteria XML document can contain the following elements:
- <PoolId>
- Specifies the ID of the pool to search.
- <SearchRangeStart>
- Specifies the resource representing the first address from which to begin the search.
- <SearchRangeEnd>
- Specifies the resource representing the last inclusive address to search.
- <DesiredRangeSize>
- (Optional) Specifies the size of the resource range to return.
- <ResultLimit>
- (Optional) Specifies the number of pool results to return.
- <BackLink>
- (Optional) Specifies that results still in quarantine are included for this backLink.
<PoolSearchCriteria xmlns="http://xml.inomial.com/smile/2.xsd">
<PoolId>6070712e-0058-4114-8cbd-94a2c57d145c</PoolId>
<SearchRangeStart>0399970000</SearchRangeStart>
<SearchRangeEnd>0399999999</SearchRangeEnd>
<DesiredRangeSize>10000</DesiredRangeSize>
<ResultLimit>3</ResultLimit>
</PoolSearchCriteria>
Results
This method returns a PoolSearchResults XML document listing the results of the search.
There are no messages defined by this method.
Example: A returned PoolSearchResults XML document
This example shows a PoolSearchResults XML document. The numbers 0399990000 through 0399999999 are already reserved, so there are only two available blocks of 10,000 numbers listed.
<PoolSearchResults xmlns="http://xml.inomial.com/smile/2.xsd" xmlns:ns3="http://ws.inomial.com/smile.2">
<PoolSearchResult>
<PoolId>6070712e-0058-4114-8cbd-94a2c57d145c</PoolId>
<RangeStart>0399970000</RangeStart>
<RangeEnd>0399979999</RangeEnd>
</PoolSearchResult>
<PoolSearchResult>
<PoolId>6070712e-0058-4114-8cbd-94a2c57d145c</PoolId>
<RangeStart>0399980000</RangeStart>
<RangeEnd>0399989999</RangeEnd>
</PoolSearchResult>
</PoolSearchResults>
Faults
InvalidRequestExceptionThis fault is returned when a required parameter is not specified, or a parameter is invalid.
NoSuchItemExceptionThis fault is returned when no pool with the given poolId exists.
Java client syntax
java -cp build/smilewsv2-client.jar [options]
com.inomial.smile.client.v2.examples.search filename
- filename
- Purpose: Defines the filename of the PoolSearchCriteria XML document.