我尝试使用soap并连接到wsdl文件。我不知道为什么2从10个请求发送,但其他给我错误的版本错误。我在调用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,发布于 2017-04-30 05:47:14
终于找到了原因。
在我的代码中,我使用了这样的旧版本:
$result = $this->serve()->__soapCall($functionName, $arguments);protected function serve()
{
if (is_null($this->client))
{
$this->client = new SoapClient($this->wsdl, $this->options);
}
return $this->client;}
当我转向这个问题时,解决这个问题:
$sms_client = new SoapClient($this->wsdl, array('encoding'=>'UTF-8'));
$result = $sms_client->$functionName($arguments);https://stackoverflow.com/questions/43656612
复制相似问题