|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 12:00:01 2025 UTC |
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?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.