我正在研究基于TNT SOAP的API,我使用的是下面的代码,但是只得到错误,我无法理解我做错了什么?
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);
我收到此错误:
致命错误:未捕获的SoapFault异常:[s:Client]此错误的创建者未指定Reason。在D:\ xampp \ htdocs \ tnt \ soap.php:11
堆栈跟踪:
#0 D:\ xampp \ htdocs \ tnt \ soap.php(11):SoapClient-> __ soapCall(' ProcessConsignm ...',Array)
在第11行的D:\ xampp \ htdocs \ tnt \ soap.php中抛出#1 {main}