I\'m trying to invoke a WS over https on a remote host:remote port and I get:
Error fetching http headers
using the PHP5 SoapCli
I faced same problem and tried all the above solutions. Sadly nothing worked.
I solved my problem with adding the compression header property. This is actually required when you are expecting a response in gzip compressed format.
//set the Headers of Soap Client.
$client = new SoapClient($wsdlUrl, array(
'trace' => true,
'keep_alive' => true,
'connection_timeout' => 5000,
'cache_wsdl' => WSDL_CACHE_NONE,
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,
));
Hope it helps.
Good luck.