php7 soap 接收,PHP7 SoapClient问题

我最近从PHP5.4升级到PHP7.男孩是一个改变,但这是不重要的.

自升级以来,我遇到了SoapService的问题.

这是我的SoapRequest在PHP5.4上的样子:

*redacted*

*redacted*

*redacted*

sha1

*redacted*

created

gt

2016-07-26

created

lt

2016-07-27

response

eq

A

true

0

9999

TransID

以下是在PHP7上运行完全相同的代码的请求:

*redacted*

*redacted*

*redacted*

sha1

*redacted*

Field

created

Type

gt

Value

2016-07-26

Field

created

Type

lt

Value

2016-07-26

Field

response

Type

eq

Value

A

true

0

9999

created

以下是相关的PHP代码:(注$sec)是已编辑的安全信息.

$param = array(

array('Field' => 'created', 'Type' => 'gt', 'Value' => date('Y-m-d', strtotime('2016-07-26'))),

array('Field' => 'created', 'Type' => 'lt', 'Value' => date('Y-m-d', strtotime('2016-07-26'))),

array('Field' => 'response', 'Type' => 'eq', 'Value' => 'A')

);

$matchAll = true;

$start = 0;

$limit = 9999;

$sort = 'TransID';

$this->advClient = new SoapClient($this->adv_wsdl, array('trace' => 1, 'exceptions' => 1, 'cache_wsdl' => WSDL_CACHE_BOTH, 'soap_version' => SOAP_1_2));

$result = $this->advClient->searchTransactions($sec, $searchParam, $matchAll, $start, $limit, $sort);

我最终得到的是一个错误.我认为问题是在PHP7中它包装并添加额外的“item”标签.但是有些功能仍然没有问题.还有其他人遇到过这个吗?

解决方法:

有趣的是,我使用了wsdltophp.com并为WSDL创建了一个类,一切正常.

标签:php,soap,web-services,php-7,soap-client

来源: https://codeday.me/bug/20190702/1353426.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值