php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46063 SoapFault exception: [HTTP] Error Fetching http headers
Submitted: 2008-09-12 07:49 UTC Modified: 2009-11-12 01:00 UTC
Votes:19
Avg. Score:3.6 ± 1.2
Reproduced:12 of 13 (92.3%)
Same Version:4 (33.3%)
Same OS:3 (25.0%)
From: filip_stjernberg at hotmaol dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.6 OS: Windows vista
Private report: No CVE-ID: None
 [2008-09-12 07:49 UTC] filip_stjernberg at hotmaol dot com
Description:
------------
I'm trying to use an existing webservice:
http://testhorizon.gothiagroup.com/AFSServices/AFSService.svc?wsdl

There is a simple test function called "HelloWorld" that returns the input "myVaule". This function dos not need authentification but its more advaced one do.

Really need this to work, have tried nuSOAP to but that gives me other problems.

Reproduce code:
---------------
This is the code I use:

try{
    $wsdl = 'http://testhorizon.gothiagroup.com/AFSServices/AFSService.svc?wsdl';
    $client = new SoapClient($wsdl,
    array(
          'soap_version' => SOAP_1_2,
          'trace'      => 1,
          'exceptions' => 1
    ));

    print($client->HelloWorld(array('myValue' => 'Test')));
    
} catch (Exception $e) {
    printf("Message = %s\n",$e->__toString());
}

print "<pre>n";
  print "Request :n".htmlspecialchars($client->__getLastRequest()) ."n";
  print "Response:n".htmlspecialchars($client->__getLastResponse())."n";
  print "</pre>";

Expected result:
----------------
Hello from AFSService: Test

Actual result:
--------------
Message = SoapFault exception: [HTTP] Error Fetching http headers in /customers/veus.se/veus.se/httpd.www/Test/samples/AFSWS1.php:20 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://testhori...', 'http://tempuri....', 2, 0) #1 [internal function]: SoapClient->__call('HelloWorld', Array) #2 /customers/veus.se/veus.se/httpd.www/Test/samples/AFSWS1.php(20): SoapClient->HelloWorld(Array) #3 {main} 

nRequest :n<?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:HelloWorld><ns1:myValue>Exor</ns1:myValue></ns1:HelloWorld></env:Body></env:Envelope>

nResponse:nn


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-13 23:24 UTC] felipe@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2009-02-21 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-03-13 08:53 UTC] ft20082 at 163 dot com
i have some problem with it.
and my result is :
Fatal error: Uncaught SoapFault exception: [HTTP] Error Fetching http headers in E:\wwwroot\wsdl.php:41 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://webservi...', '', 1, 0) #1 E:\wwwroot\wsdl.php(41): SoapClient->__soapCall('searchFlights', Array) #2 {main} thrown in E:\wwwroot\wsdl.php on line 41

so, what should i do?
 [2009-11-04 13:10 UTC] ucl at mail dot ru
I've solve the problem of "Error Fetching http headers" by adding

ini_set('max_input_time', -1);

before SOAP call.
Problem is that my SOAP server have to think long time after request, and i'v had timeout in soap.
 [2009-11-04 21:46 UTC] srinatar@php.net
looking at the truss output, it  seems to me the endpoint service is waiting for some more input to be provided as part of your HelloWorld request. you might want to check their documentation . 

i don't think there is any issue with SoapClient implementation here. 

 [2009-11-12 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC