I am using NuSoap to make an xml web service call to a URL, but things seem to fail when I try to make a method call.
error_reporting(-1);
ini_set("soap.wsdl_cache_enabled", "0");
print('Start....<br/>');
$xml = [properly formatted xml with security header....not shown for brevity and security];
//Include SOAP library
require_once('lib/nusoap.php');
print('Library included....<br/>');
//Set webservice URL
$url = 'http://ift.tt/105703s';
print('URL is '.$url.'....<br/>');
//Create SOAP instance
$client = new nusoap_client($url, 'true');
//check if there were any instantiation errors, and if so stop execution with an error message:
$error = $client->getError();
if ($error)
die("client construction error: {$error}\n");
else
print('SOAP instance created....<br/>');
//authenticate to the service:
print 'Attemtping to authenticate....<br/>';
$t = $client->setCredentials('E2@E2MANAGE', 'Integration123');
if ($error)
die("Authentication error: {$error}\n");
else
print('Webservice authentication OK....<br/>');
print 'Calling getVehicleIDList ....<br/>';
$result = $client->getVehicleIDList(null, 2);
echo '<pre>';
print_r($result);
echo '</pre>';
//Check for error
$error = $client->getError();
if ($error)
die("Error: {$error}\n");
else
print('Call OK....<br/>');
This is what I see on my screen:
Start....
Library included....
URL is http://ift.tt/105703s....
SOAP instance created....
Attemtping to authenticate....
Webservice authentication OK....
Calling getVehicleIDList ....
Everything looks ok until it gets to the web service method call. Anyone have any idea why this might be? I confirmed that the parameters I am passing in the method call are valid. Is it a problem with the web service, or am I doing something wrong on my end.
No comments:
Post a Comment