如下文的wsdl文件我如何通过soap来验证header中的code和token信息SoapHeader的命名空间和方法名应该是什么?<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.ws.mall.b2b.vic.com/">
<soapenv:Header>
<authrity>
<code>12323232323</code>
<token>23333</token>
</authrity>
</soapenv:Header>
<soapenv:Body>
<ws:addSx>
<OrderInfoList>
<csChannelType>其他</csChannelType>
<csCity>?</csCity>
<!--Optional:-->
<csCounty>?</csCounty>
<csCustaddress>北京北京市东城区楼下等你</csCustaddress>
<csCustname>马甲</csCustname>
</OrderInfoList>
</ws:addSx>
</soapenv:Body>
</soapenv:Envelope>
----------------------------------------------------
我的做法:
$client=new SoapClient($this->url_addr_addsx);
//var_dump($client->__getTypes());
$header = new SoapHeader($this->url_addr_addsx, 'authrity', array('code'=>$this->dealierId,'token'=>$this->token), false, SOAP_ACTOR_NEXT);
$client->__setSoapHeaders($header);
$result=$client->addSx($xml_str);
var_dump($result);报的错误是:
An uncaught Exception was encounteredType: SoapFaultMessage: 找不到code信息是哪里错误了?
<soapenv:Header>
<authrity>
<code>12323232323</code>
<token>23333</token>
</authrity>
</soapenv:Header>
<soapenv:Body>
<ws:addSx>
<OrderInfoList>
<csChannelType>其他</csChannelType>
<csCity>?</csCity>
<!--Optional:-->
<csCounty>?</csCounty>
<csCustaddress>北京北京市东城区楼下等你</csCustaddress>
<csCustname>马甲</csCustname>
</OrderInfoList>
</ws:addSx>
</soapenv:Body>
</soapenv:Envelope>
----------------------------------------------------
我的做法:
$client=new SoapClient($this->url_addr_addsx);
//var_dump($client->__getTypes());
$header = new SoapHeader($this->url_addr_addsx, 'authrity', array('code'=>$this->dealierId,'token'=>$this->token), false, SOAP_ACTOR_NEXT);
$client->__setSoapHeaders($header);
$result=$client->addSx($xml_str);
var_dump($result);报的错误是:
An uncaught Exception was encounteredType: SoapFaultMessage: 找不到code信息是哪里错误了?
$header = new SoapHeader($this->url_addr_addsx, 'authrity', $authvalues, false, SOAP_ACTOR_NEXT); $this->url_addr_addsx 是什么?