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 had the same issue and tried the following by disabling keep_alive.
$api_proxy = new SoapClient($api_url, array('trace' => true, 'keep_alive' => false));
However, that didn't work for me. What worked worked for me was disabling the SOAP cache. It appears to have been caching the wrong requests and after disabling I actually noticed my requests were executing faster.
On a linux server you can find this in your /etc/php.ini file.
Look for soap.wsdl_cache_enabled=1 and change it to soap.wsdl_cache_enabled=0.
Don't forget to reload apache.
service httpd reload