Php 在LaravelSOAP中,偶尔会给我错误的版本错误?
我尝试使用soap并连接到wsdl文件。 我不知道为什么从10个请求发送2个,但其他给我错误的版本错误。我通过调用soap定义了版本Php 在LaravelSOAP中,偶尔会给我错误的版本错误?,php,web-services,soap,wsdl,laravel-5.1,Php,Web Services,Soap,Wsdl,Laravel 5.1,我尝试使用soap并连接到wsdl文件。 我不知道为什么从10个请求发送2个,但其他给我错误的版本错误。我通过调用soap定义了版本 'soap_version'=> SOAP_1_1, wsdl从以下内容开始: <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soap
'soap_version'=> SOAP_1_1,
wsdl从以下内容开始:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
我终于找到了原因
在我的代码中,我使用了如下旧版本:
"message": "Wrong Version",
"status_code": 500,
$result = $this->serve()->__soapCall($functionName, $arguments);
} 然后,当我换成这个时,解决这个问题:
$sms_client = new SoapClient($this->wsdl, array('encoding'=>'UTF-8'));
$result = $sms_client->$functionName($arguments);
$sms_client = new SoapClient($this->wsdl, array('encoding'=>'UTF-8'));
$result = $sms_client->$functionName($arguments);