首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在拉拉香皂中偶尔给我错误的版本错误?

在拉拉香皂中偶尔给我错误的版本错误?
EN

Stack Overflow用户
提问于 2017-04-27 11:34:03
回答 1查看 305关注 0票数 0

我尝试使用soap并连接到wsdl文件。我不知道为什么2从10个请求发送,但其他给我错误的版本错误。我在调用soap中定义了

代码语言:javascript
复制
'soap_version'=>        SOAP_1_1,

wsdl从以下内容开始:

代码语言:javascript
复制
<?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/">

错误告诉我如下:

代码语言:javascript
复制
 "message": "Wrong Version",
  "status_code": 500,
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-04-30 05:47:14

终于找到了原因。

在我的代码中,我使用了这样的旧版本:

代码语言:javascript
复制
$result = $this->serve()->__soapCall($functionName, $arguments);
代码语言:javascript
复制
protected function serve()

{

if (is_null($this->client))
{
    $this->client = new SoapClient($this->wsdl, $this->options);
}
return $this->client;

}

当我转向这个问题时,解决这个问题:

代码语言:javascript
复制
$sms_client = new SoapClient($this->wsdl, array('encoding'=>'UTF-8'));

        $result =  $sms_client->$functionName($arguments);
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43656612

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档