简体   繁体   English

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

[英]How to set this soap header on a SOAP CALL PHP?

<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. 我需要将此标头添加到soap调用中,但是,我发现的示例需要一些名称空间,其结果是如此不同。

I used NuSoap.php 我用了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);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM