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 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)