webservice 报错 Server was unable to process request.

我是特种兵 发布于 2016/09/06 15:07
阅读 1K+
收藏 0

webservice接口报错:Server was unable to process request. ---> Object reference not set to an instance of an object.

webservice接口有身份验证,xml格式如下:

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
  <soap12:Body>
    <Vipadd xmlns="http://www.tech-trans.com.cn/">
      <request>
        <Header>
          <REQDATE>string</REQDATE>
          <REQTIME>string</REQTIME>
          <SIGN>string</SIGN>
          <USER>string</USER>
        </Header>
        <Data>
          <vip>
            <ExtensionData xsi:nil="true" />
            <address>string</address>
            <birthday>string</birthday>
            <email>string</email>
            <idcardno>string</idcardno>
            <idcardtype>string</idcardtype>
            <isfreeze>string</isfreeze>
            <jointdate>string</jointdate>
            <mobile>string</mobile>
          </vip>
        </Data>
      </request>
    </VipCreate>
  </soap12:Body>
</soap12:Envelope>

下面是代码

$client = new \SoapClient('http://xxxxxxxxxxxxxxxxxx?wsdl');
        
        $auth=array('SIGN'=>'sdfsdf2r32rwf', 'REQDATE'=>'23432423', 'REQTIME'=>'2423423423', 'USER'=>'aaaaaa');
        $data['mobile'] = '1111111111';
        $data['idcardno'] = '457045645976678';
        $header = new \SoapHeader('','',$auth,false);
        $client->__setSoapHeaders($header);
        $a=$client->Vipadd(array('vip'=>$data));


求帮助,在线等,急。谢谢。

加载中
返回顶部
顶部