PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

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

原创
2016-06-23 13:14:00 986浏览

echo '提供的方法';dump($client->__getfunctions());echo '数据结构';dump($client->__gettypes());

页面打印:
提供的方法
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' => '',  ));
调用时
$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)



前辈我爱你~~~
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。