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

WBOY
Release: 2016-06-23 13:14:00
Original
1116 people have browsed it

echo '提供的方法';dump($client->__getFunctions());echo '数据结构';dump($client->__getTypes());
Copy after login

页面打印:
提供的方法
array(1) {
[0] => string(56) "AdcServicesResponse AdcServices(AdcServices $parameters)"
}
数据结构
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' => '',  ));
Copy after login
Copy after login
调用时
$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' => '',  ));
Copy after login
Copy after login
调用时
$client->AdcServices($ar)



前辈我爱你~~~
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template