1E. METHOD FOR GETTING AVAILABLE NXX LIST BY NPA
This method returns the list of available available NXX by NPA and Vendor Rating in the form of an array. The user is required to give User ID, Password, NPA and Vendor Ratings as arguments and he’ll get a list of available NXX list of that country.
Note: Please note that this function works only for USA.
Method Signature
sub getAvailableRatedNXX ($UserID,$Password,$CountryCode,$NPA,$VRatingFrom,$VRatingTo)
Example Usage
We are providing a sample code in PHP which accesses and uses this service.
Click here for .net example for this API
<?php
require_once “nusoap.php”;
$parameters=array(“65948″,”sdaf485″,”1″,”567″,”5″,”9”);
$soapclient= new soapclient(‘http://api.didx.net/webservice/WebGetListServer.php’);
$SoapResult = array();
$SoapResult = $soapclient->call(“getAvailableRatedNXX”, $parameters,’urn:getAvailableRatedNXX’);
print_r($SoapResult);
?>
.Net WSDL WebService? Example in PHP 5 using native SOAP Class:
try {
$client = new SoapClient(“http://wsdl.didx.org/WebGetListServer.asmx?wsdl”, array(‘trace’ => true, ‘exceptions’ => true/*, ‘classmap’ => $classmap*/));
$result=$client->getAvailableRatedNXX(array(“UserID”=>”700733″,”Password”=>”abc”,”CountryCode”=>”1″,”NPA”=>”567″,”VRatingFrom”=>”1″,”VRatingTo”=>”5″,”Vendors”=>””));
} catch (SoapFault $exception) {
echo $client->__getLastRequest();
echo $client->__getLastResponse();
print_r($exception);
}
print_r($result);
exit;
For an explanation of using .Net web service in PERL Click here
The first two arguments passed to the method are user id and password. The third argument is the country code, the fourth represents the NPA, fifth starting Rating and the sixth represents the ending Rating. In this case, we’ve provided ratings from 5 to Vendor Rating 9. This will return the list of all available NXX of NPA 567.
Fields Returned:
CountryCode?
Country
AreaCode?
Area
NXX
Error Codes
In case of any incorrect information provided by the user or in case of no matching data, an error code will be returned. Error codes correspond to the following messages:
-1 = User ID does not exist
-2 = Your Password is Incorrect
-3 = There are no rated DIDs’ Areas avaiable in our record.