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

如何在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);
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 vue使用gojs,需求在link中的虚线上添加方向箭头
  • ¥15 CSS通配符清除内外边距为什么可以覆盖默认样式?
  • ¥15 SPSS分类模型实训题步骤
  • ¥15 求解决扩散模型代码问题
  • ¥15 工创大赛太阳能电动车项目零基础要学什么
  • ¥20 limma多组间分析最终p值只有一个
  • ¥15 nopCommerce开发问题
  • ¥15 torch.multiprocessing.spawn.ProcessExitedException: process 1 terminated with signal SIGKILL
  • ¥15 QuartusⅡ15.0编译项目后,output_files中的.jdi、.sld、.sof不更新怎么解决
  • ¥15 pycharm输出和导师的一样,但是标红