Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在LaravelSOAP中,偶尔会给我错误的版本错误?_Php_Web Services_Soap_Wsdl_Laravel 5.1 - Fatal编程技术网

Php 在LaravelSOAP中,偶尔会给我错误的版本错误?

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并连接到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: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);