Accept-Encoding Header for SoapClient

0

There is no way to include a 'Accept-Encoding: gzip, deflate' header to a SoapClient request with SoapHeader and __setSoapHeaders. Can someone guide me?

$sc = new SoapClient($url1, array("trace" => true, "exceptions" => false)); 
$sh = new SoapHeader(/*xxxxx*/); // Aquí qué?
$sc->__setSoapHeaders($sh); 
$rs = $sc->__doRequest($xml, $url2, "http://www.blablabla", '1.2');

Thanks in advance.

    
asked by Pakalolo 15.12.2016 в 13:18
source

1 answer

0

I answer myself. I was wrong What I wanted was not to be included in SoapHeader headers but in the SoapClient constructor option.

$client = new SoapClient("some.wsdl", array('compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP));

I obstinate with that.

    
answered by 15.12.2016 в 16:23