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
Purpose: Defines a PoolSearchCriteria XML document that specifies the parameters of the search.

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.
Default=0. 0 means results are not checked for size. A positive value will return groups with the range size specified.
<ResultLimit>
(Optional) Specifies the number of pool results to return.
Default=30.
<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

InvalidRequestException

This fault is returned when a required parameter is not specified, or a parameter is invalid.

NoSuchItemException

This 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.
Note: For more information about the Java client and the options it accepts, see Java client syntax.