Fixed: Uncaught SoapFault exception: [HTTP] Error Fetching http headers using PHP SOAP

For me this error was caused by having logical errors in the PHP script that my SOAP service was calling.

$client = new SoapClient('', array('trace' => 1));
$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');

$session = $client->login('username', 'password');

try {
$result = $client->call(
echo "
echo "</pre>
} catch (SoapFault $e) {
echo $e->getMessage()


To debug a SOAP service, pass the XDEBUG cookie by setting it to the SOAP request:
$client->__setCookie('XDEBUG_SESSION', 'PHPSTORM');
Don’t use the browser bookmarklet if you’ve got one of those.

Leave a Reply

Your email address will not be published. Required fields are marked *