• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

求前辈支援,连接wsdl问题。

php 搞代码 4年前 (2022-01-23) 8次浏览 已收录 0个评论
文章目录[隐藏]
echo '提供的方法';dump($client->__getFunctions());echo '数据结构';dump($client->__getTypes());

页面打印:
提供的方法
array(1) {
[0] => string(56) “AdcServicesResponse AdcServices(AdcServices $parameters)”

5本文来源gao!daima.com搞$代!码#网#

搞代gaodaima码

}
数据结构
array(4) {
[0] => string(37) “struct AdcServices {
NGEC request;
}”
[1] => string(217) “struct NGEC {
string OrigDomain;
string BIPCode;
string BIPVer;
string TransIDO;
string Areacode;
string ECCode;
string ECUserName;
string ECUserPwd;
string ProcessTime;
Response Response;
string SvcCont;
}”
[2] => string(53) “struct Response {
string RspCode;
string RspDesc;
}”
[3] => string(55) “struct AdcServicesResponse {
NGEC AdcServicesResult;
}”
}

我现在往 $client->ADCServices()里怎么传参呢?
第一回接触这种,整个人都是晕的。

回复讨论(解决方案)

AdcServicesResponse AdcServices( AdcServices $parameters)
表示 AdcServices 需要一个 AdcServices 类型的参数

struct AdcServices {
NGEC request;
}
表是 AdcServices 有一个 NGEC 类型的参数 request
找到 NGEC 并带入,得
AdcServices {
NGEC request = {
string OrigDomain;
string BIPCode;
string BIPVer;
string TransIDO;
string Areacode;
string ECCode;
string ECUserName;
string ECUserPwd;
string ProcessTime;
Response Response = {
string RspCode;
string RspDesc;
},
string SvcCont;
}
}
由于 php 并无 struct 结构,所以用关联数组代替

$ar = array(   'request'  => array(      'OrigDomain' => '',      'BIPCode' => '',      'BIPVer' => '',      'TransIDO' => '',      'Areacode' => '',      'ECCode' => '',      'ECUserName' => '',      'ECUserPwd' => '',      'ProcessTime' => '',      'Response' => array(         'RspCode' => '',         'RspDesc' => '',      ),      'SvcCont' => '',  ));

调用时
$client->AdcServices($ar)

AdcServicesResponse AdcServices( AdcServices $parameters)
表示 AdcServices 需要一个 AdcServices 类型的参数

struct AdcServices {
NGEC request;
}
表是 AdcServices 有一个 NGEC 类型的参数 request
找到 NGEC 并带入,得
AdcServices {
NGEC request = {
string OrigDomain;
string BIPCode;
string BIPVer;
string TransIDO;
string Areacode;
string ECCode;
string ECUserName;
string ECUserPwd;
string ProcessTime;
Response Response = {
string RspCode;
string RspDesc;
},
string SvcCont;
}
}
由于 php 并无 struct 结构,所以用关联数组代替

$ar = array(   'request'  => array(      'OrigDomain' => '',      'BIPCode' => '',      'BIPVer' => '',      'TransIDO' => '',      'Areacode' => '',      'ECCode' => '',      'ECUserName' => '',      'ECUserPwd' => '',      'ProcessTime' => '',      'Response' => array(         'RspCode' => '',         'RspDesc' => '',      ),      'SvcCont' => '',  ));

调用时
$client->AdcServices($ar)

前辈我爱你~~~


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:求前辈支援,连接wsdl问题。

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址