From:
Operating system: Windows 7 Ultimate N
PHP version: 5.3.12
Package: SOAP related
Bug Type: Bug
Bug description:SoapClient Error Fetching http headers
Description:
------------
Hello,
I'm not so skilled with SOAP but I need to use it for a specific request
and I'm
in trouble with a SOAP call to an existing WSDL.
The web service provider has recently changed its environment from PHP to
ASP.NET and from SOAP 1.1 to SOAP 1.2. Since then I can't use the service I
need, and I'm getting this Error fetching HTTP heders.
I'm pretty sure that's my client error because another user (they said),
that
uses .NET client, is going well.
I found in many sites and forums that can be a bug in versions below 5.2.6
but,
as I said, I'm using >5.3 version.
How can I fix it?
Thanks in advance!
Test script:
---------------
<?php
ini_set("soap.wsdl_cache_enabled","0");
$cli=new
SoapClient("http://www.infonetsrl.it/Dev/infonetwcf/WsRapportiService.svc?wsdl",array("soap_version"=>SOAP_1_2,"trace"=>1));
$auth=array("user"=>"xxx","password"=>"xxx");
$params=array(
"CF"=>"xxx",
"Report"=>"PGA",
"ExportHTML"=>"true"
);
try{
$content=$cli->RichiestaNuovoRapporto(array_merge($auth,$params));
}catch(Exception $e){
$debug='<h2>Exception</h2><pre>'.htmlspecialchars($e,
ENT_QUOTES).'</pre>';
$debug
.='<h2>getLastRequest</h2><pre>'.htmlspecialchars($cli->__getLastRequest(),
ENT_QUOTES).'</pre>';
$debug
.='<h2>getLastResponse</h2><pre>'.htmlspecialchars($cli->__getLastResponse(),
ENT_QUOTES).'</pre>';
}
echo $debug;
?>
The WSDL file is found here:
http://www.infonetsrl.it/Dev/infonetwcf/WsRapportiService.svc?wsdl
Actual result:
--------------
***Exception***
SoapFault exception: [HTTP] Error Fetching http headers in C:\Program
Files\xampp\htdocs\spotter\classes\SOAP_functions.php:160
Stack trace:
#0 [internal function]: SoapClient->__doRequest('<?xml version="...',
'http://www.info...', 'http://tempuri....', 2, 0)
#1 [internal function]: SoapClient->__call('RichiestaNuovoR...', Array)
#2 C:\Program Files\xampp\htdocs\spotter\classes\SOAP_functions.php(160):
SoapClient->RichiestaNuovoRapporto(Array)
#3 C:\Program Files\xampp\htdocs\spotter\transactioner.php(202):
SOAP_functions-
>buyDocument(Object(MySQL_functions), Object(Generic_functions), Array,
'1',
'1_nsordyll_shoe...', 0, Array)
#4 {main}
***getLastRequest***
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:ns1="http://tempuri.org/"><env:Body><ns1:RichiestaNuovoRapporto>
<ns1:password>WSRAPPORTI</ns1:password></ns1:RichiestaNuovoRapporto></env:Body>
</env:Envelope>
***getLastResponse***
--
Edit bug report at https://bugs.php.net/bug.php?id=61938&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=61938&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=61938&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=61938&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=61938&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=61938&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=61938&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=61938&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=61938&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=61938&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=61938&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=61938&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=61938&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=61938&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=61938&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=61938&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=61938&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=61938&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=61938&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=61938&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=61938&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=61938&r=mysqlcfg