php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61938 SoapClient Error Fetching http headers
Submitted: 2012-05-04 09:30 UTC Modified: 2012-05-04 12:50 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: nicola dot riva at emiliainformatica dot it Assigned:
Status: Open Package: SOAP related
PHP Version: 5.3.12 OS: Windows 7 Ultimate N
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nicola dot riva at emiliainformatica dot it
New email:
PHP Version: OS:

 

 [2012-05-04 09:30 UTC] nicola dot riva at emiliainformatica dot it
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***

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-04 12:07 UTC] reeze dot xia at gmail dot com
Hi, nicola:
   I've tested the soap service, it seems that the service is broken.
action point to http://tempuri.org. obviously, it just for test. but it didn't
work anymore, you could try this one:

http://graphical.weather.gov/xml/DWMLgen/wsdl/ndfdXML.wsdl

It works good.

BTW: next time if you have usage problem, you could try ask on 
stackoverflow.com,
you will get response more quickly, since bugs.php.net is about BUGS for php it 
self but not PHP usage.;)
 [2012-05-04 12:50 UTC] nicola dot riva at emiliainformatica dot it
Hi Reeze,
Thank you for your reply and sorry if I wrote here instead of stackoverflow.
Next time I'll use it first :)

Now trying to solve this.
 [2012-06-12 10:08 UTC] braju dot cse at gmail dot com
Hi,
     Am also receive same problem. could you tell the problem on windows 7 ultimate?

Regards,
Raju.B
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 02:01:30 2024 UTC