1

11

解决方案 »

  1.   

    替你写了一段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);
      

  2.   

    不好意思,再问一下啊
    $PolicyQueryRequest->userInfo=$userinfo;这是什么意思啊?
    把上面代码解释一下啊。小生不才!
      

  3.   

    根本没有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。
      

  4.   

    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>