duandong7980
2015-01-02 21:24
浏览 59
已采纳

如何在SOAP CALL PHP上设置这个soap标头?

<SOAP-ENV:Header>
 <Seguridad>
  <usuario>0000000000</usuario>                               
  <password>9FDBDE265822755C50dHD5D33B61580736ECB94978BC40DDD2D4220CB63FE7E</password>
  <fechaSistema>02/01/2015</fechaSistema>
 </Seguridad>
</SOAP-ENV:Header>

I need to add this header to the soap call, but, the examples that I found need some namespace, and result so different of this.

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doujianqin5172 2015-01-05 23:50
    已采纳

    I used NuSoap.php

    $wsdl = "https://www.convolmiscelaneapruebas.pemex.com/ServiciosCVWEB/ServicioEnviaCONVOLService/ServicioEnviaCONVOLService.wsdl";
    $client = new nusoap_client($wsdl,TRUE);
    $header = 
    "<Seguridad>
      <usuario>0001250000</usuario>
      <password>4e671bf08913dn8k09d6359262117c8e67a5507b165f727288a487040bf2a1780</password>
      <fechaSistema>02/01/2015</fechaSistema>
    </Seguridad>";
    $operation = array('arg0' => '2012-08-25', 
            'arg1' => '11:48:46', 
            'arg2'=>'12095866a6l9b7dbcd44640189c57hlZ5918192739040eb52ba5b==',
            'arg3'=>'ZmU5866axMzc3ZDQyJmdAyZjM2YTc57Db7dbcd446401YTM1Mg3Ng=='
            );
    $client->setHeaders($header);
    $res = $client->call('enviaCONVOL',$operation);
    
    已采纳该答案
    打赏 评论

相关推荐 更多相似问题