#33567 [Asn]: SoapClient works only when exceptions are turned off

From: Date: Mon, 11 Jul 2005 08:20:03 +0000
Subject: #33567 [Asn]: SoapClient works only when exceptions are turned off
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81663@lists.php.net to get a copy of this message
ID: 33567 Updated by: dmitry@php.net Reported By: please-no-spam at blueyonder dot co dot uk Status: Assigned Bug Type: SOAP related Operating System: Windows XP Pro PHP Version: 5.1.0b2 Assigned To: dmitry New Comment: Seems ext/soap is right. You server answer - string(660) " 98.42 " is not an XML. However may be all XML was hidden. Please try to run client from command line or use var_dump(htmlspecialchars($x->__getLastResponse())). Previous Comments: ------------------------------------------------------------------------ [2005-07-05 17:44:13] please-no-spam at blueyonder dot co dot uk Dump Info From: =============== var_dump($x->__getLastResponseHeaders()); var_dump($x->__getLastResponse()); ********************************************* string(110) "HTTP/1.1 100 Continue Server: Microsoft-IIS/5.1 Date: Tue, 05 Jul 2005 15:37:50 GMT X-Powered-By: ASP.NET " string(660) " 98.42 " ********************************************* Exception Info: ============== SoapFault exception: [SOAP-ENV:Client] looks like we got no XML document in c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:24 Stack trace: #0 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24): SoapClient->__call('getQuote', Array) #1 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(24): SoapClient->getQuote('ibm') #2 {main} Hope this helps. ------------------------------------------------------------------------ [2005-07-05 15:13:28] dmitry@php.net I cannot reproduce this bug, but may be this is IIS6 specific problem. Could you please add "trace" option to SoapClient constructor and the following code after soap call. var_dump($x->__getLastResponseHeaders()); var_dump($x->__getLastResponse()); ------------------------------------------------------------------------ [2005-07-04 19:52:34] please-no-spam at blueyonder dot co dot uk Description: ------------ When I try to create my own web service using php 5.0.3 or 5.1.0b2 using Dmitry Stogov's example at zend.com code on Windows XP Pro IIS6: eg: $x = SoapClient(WSDL); I get: SoapFault exception: [SOAP-ENV:Client] looks like we got no XML document in c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:13 Stack trace: #0 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13): SoapClient->__call('getQuote', Array) #1 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13): SoapClient->getQuote('ibm') #2 {main} Enabling Trace & Disabling exceptions like this: $x = SoapClient(WSDL, array("trace"=>1, "exceptions"=>0)); and the problem goes away. This means I can't enable exceptions with the Soap Client. Reproduce code: --------------- $client = new SoapClient("stockquote.wsdl"; try { $client->getQuote("ibm"); echo $client->__getLastResponse(); } catch (SoapFault $exception) { echo $exception; } Expected result: ---------------- 98.42 Actual result: -------------- SoapFault exception: [SOAP-ENV:Client] looks like we got no XML document in c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php:13 Stack trace: #0 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13): SoapClient->__call('getQuote', Array) #1 c:\Inetpub\wwwroot\Php\DummyWebService\MyWebServerClient.php(13): SoapClient->getQuote('ibm') #2 {main} ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33567&edit=1

« previous php.bugs (#81663) next »