How can I send header in a SOAP request with php

0

I need to replicate this xml to a soap request in php:

<soapenv:Header>
    <tar:headerRequest>
        <head:transaccion>
            <head:fechaHora>2015-09-11T16:00:00</head:fechaHora>
            <head:idTransaccionNegocio>0</head:idTransaccionNegocio>
            <head:sistema>RRRR</head:sistema>
            <head:usuario>TTTT</head:usuario>
        </head:transaccion>
    </tar:headerRequest>
</soapenv:Header>

I'm using soap header but it keeps showing me the error:

  

Technical: PX000040: BEA-382505: XPath statement produced no nodes to validate

This is my code in PHP:

$auth = array(
    'fechaHora' => '2015-09-11T16:00:00',
    'idTransaccionNegocio' => 0,
    'sistema' => 'RRRR',
    'usuario'=> 'TTTT'<
);
$header = new SoapHeader("NAMESPACE", 'Transaccion', $auth, false);
$client->__setSoapHeaders($header);

I have tried a thousand ways and nothing, if someone can help me I would thank them in my soul for days now.

NOTE: Sending the complete xml by curl the service responds me successfully, but I need to consume the service by soap not by curl.

    
asked by Yoneiker Plaza 29.08.2018 в 00:51
source

0 answers