1 11 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 替你写了一段policyQuery方法的用法,你照着这个思路来错不了,另外对方肯定给了你文档,介绍了每个方法的作用<?php$userInfo=new stdClass();$userinfo->loginName='thisname';$userinfo->password='thispass';$userinfo->orgId='7217143';$PolicyQueryRequest=new stdClass();$PolicyQueryRequest->userInfo=$userinfo;$PolicyQueryRequest->insuredCercCode='';$PolicyQueryRequest->policyNo='';$PolicyQueryRequest->insuredCertType='';$client = new SoapClient('http://192.168.0.1/lywx/services/SoapApplyBusiness?wsdl');$res = $client->__call('policyQuery',array($PolicyQueryRequest));var_dump($res); 不好意思,再问一下啊$PolicyQueryRequest->userInfo=$userinfo;这是什么意思啊?把上面代码解释一下啊。小生不才! 根本没有WssUserInfo方法,这是一个服务端定义的结构体:<complexType name="WssUserInfo"><sequence><element name="loginName" nillable="true" type="xsd:string"/><element name="password" nillable="true" type="xsd:string"/><element name="orgId" nillable="true" type="xsd:int"/></sequence></complexType>由三个属性构成,很多下面的函数在wsdl:operation里定义了,有些会用到这个结构体。比如楼上楼上使用的函数policyQueryRequest,它需要的参数如下:<complexType name="PolicyQueryRequest"><sequence><element name="userInfo" nillable="true" type="tns1:WssUserInfo"/><element name="insuredCercCode" nillable="true" type="xsd:string"/><element name="policyNo" nillable="true" type="xsd:string"/><element name="insuredCertType" nillable="true" type="xsd:string"/></sequence>userInfo就是你调用的那个名字的结构体WssUserInfo。 stdClass Object ( [sysMessage] => stdClass Object ( [errorMsg] => 用户不存在或者已禁用 [returnNumber] => F012 [noteMsg] => 查询保单失败 ) [insuranceDetail] => )我去请求了,好用。<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /></head><?php$client = new soapclient('http://192.168.0.1/lywx/services/SoapApplyBusiness?wsdl');$info = array('loginName' => 'name', 'password' => '123', 'orgId' => '723123');$res = $client->policyQuery(array('userInfo' => $info, 'insuredCercCode' => '', 'insuredCercCode' => '', 'insuredCertType' => '' ));print_r($res);?></html> 做网站需要学习什么啊? 《php面向对象初步入门教程pdf版》中用的软件是什么 php5.3.6与phpMyAdmin版本兼容问题怎么解决? discuz在哪里更改用户的权限让所有的用户都能上传附件 分不多,有在中科软的吗? gd库配置问题 wampserver一直offonline,端口没有被占用,netbios关闭为何运行不了 求一个PHP+MYSQL的翻牌抽奖源码 关于APP第三方登录与服务器通信,求原理 GD库 英文偶有乱码 请高手讲解一下PHP Web services 技术 php 正则表达式
$userInfo=new stdClass();
$userinfo->loginName='thisname';
$userinfo->password='thispass';
$userinfo->orgId='7217143';$PolicyQueryRequest=new stdClass();
$PolicyQueryRequest->userInfo=$userinfo;
$PolicyQueryRequest->insuredCercCode='';
$PolicyQueryRequest->policyNo='';
$PolicyQueryRequest->insuredCertType='';$client = new SoapClient('http://192.168.0.1/lywx/services/SoapApplyBusiness?wsdl');
$res = $client->__call('policyQuery',array($PolicyQueryRequest));var_dump($res);
$PolicyQueryRequest->userInfo=$userinfo;这是什么意思啊?
把上面代码解释一下啊。小生不才!
<sequence>
<element name="loginName" nillable="true" type="xsd:string"/>
<element name="password" nillable="true" type="xsd:string"/>
<element name="orgId" nillable="true" type="xsd:int"/>
</sequence>
</complexType>由三个属性构成,很多下面的函数在wsdl:operation里定义了,有些会用到这个结构体。
比如楼上楼上使用的函数policyQueryRequest,它需要的参数如下:
<complexType name="PolicyQueryRequest">
<sequence>
<element name="userInfo" nillable="true" type="tns1:WssUserInfo"/>
<element name="insuredCercCode" nillable="true" type="xsd:string"/>
<element name="policyNo" nillable="true" type="xsd:string"/>
<element name="insuredCertType" nillable="true" type="xsd:string"/>
</sequence>userInfo就是你调用的那个名字的结构体WssUserInfo。
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
</head>
<?php
$client = new soapclient('http://192.168.0.1/lywx/services/SoapApplyBusiness?wsdl');
$info = array('loginName' => 'name', 'password' => '123', 'orgId' => '723123');
$res = $client->policyQuery(array('userInfo' => $info, 'insuredCercCode' => '', 'insuredCercCode' => '',
'insuredCertType' => ''
));
print_r($res);
?>
</html>