0
votes

I am working on TNT SOAP based API, I am using below code but gets only error, I can`t understand what I am doing wrong ?

ini_set("default_socket_timeout",120);
$client = new SoapClient('https://uat.tntexpress.com.au/Webservices/Conservice/ConsignmentService.svc?wsdl');

$params = array(
   'payingAccount' => '20003191',
   'UserName' => 'NEX-APIT',
   'Password' => 'NEX_APIPWT'
);

$response = $client->__soapCall('ProcessConsignmentRequest',$params);

print_r($response);

I am getting this error :

Fatal error: Uncaught SoapFault exception: [s:Client] The creator of this fault did not specify a Reason. in D:\xampp\htdocs\tnt\soap.php:11
Stack trace:
#0 D:\xampp\htdocs\tnt\soap.php(11): SoapClient->__soapCall('ProcessConsignm...', Array)
#1 {main} thrown in D:\xampp\htdocs\tnt\soap.php on line 11

1
So what error are you getting It might be useful for us to know that little bit of informationRiggsFolly
Well then try catching the Exception and print the error message see if there is anything useful in that. You should be using try/catch anyway if this is known to throw errorsRiggsFolly

1 Answers

0
votes

I found here the working code tnt-express