PHP SOAP致命错误

时间:2015-10-10 09:15:37

标签: php soap

我正在尝试将货物系统整合到我的网站上。然后我正在使用他们的网络服务。

但是我有这样的错误: “致命错误:未捕获的SoapFault异常:[WSDL] SOAP-ERROR:解析WSDL:找不到”

错误告诉我那条线:2秒。那条线有代码:

$client = new SoapClient("http://customerservices.araskargo.com.tr/ArasCargoCustomerIntegrationService/ArasCargoIntegrationService.svc");

这是我的完整代码:

<?php
$client = new SoapClient("http://customerservices.araskargo.com.tr/ArasCargoCustomerIntegrationService/ArasCargoIntegrationService.svc");
$queryInfo = "<QueryInfo>".
"<QueryType>2</QueryType>".
"<Date>07.10.2015</Date>".
"</QueryInfo>";
$loginInfo = "<LoginInfo>".
"<UserName>xxx</UserName>".
"<Password>xxx</Password>".
"<CustomerCode>xxx</CustomerCode>".
"</LoginInfo>";
$result = $client->GetQueryXML(array('loginInfo'=>$loginInfo,'queryInfo'=>$queryInfo));
echo $result;

如何解决我的问题?

1 个答案:

答案 0 :(得分:1)

您传递给SoapClient的网址不是wsdl文件的网址。你可能想要使用:

$client = new SoapClient("http://customerservices.araskargo.com.tr/ArasCargoCustomerIntegrationService/ArasCargoIntegrationService.svc?singleWsdl");