#29844 [NEW]: SOAP doesn't return the result of a valid SOAP request

From: Date: Thu, 26 Aug 2004 04:29:57 +0000
Subject: #29844 [NEW]: SOAP doesn't return the result of a valid SOAP request
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-65259@lists.php.net to get a copy of this message
From: davey@php.net Operating system: WinXP SP2 PHP version: 5.0.1 PHP Bug Type: SOAP related Bug description: SOAP doesn't return the result of a valid SOAP request Description: ------------ I have written a simple Hello World client/server application. When I issue my request, no exception is thrown, but the result is NULL, even though the SOAP response suggests it should be otherwise. - Davey Reproduce code: --------------- Server: <?php class hello_world { /** * Say Hello to Somebody * * @param string $to The person to say Hello to * @return string The greeting */ public function hello($to) { return $this->constructMsg($to); } public function goodBye($to) { return "Goodbye $to"; } /** * Construct Greeting * * @param string $to * @return string */ private function constructMsg($to) { return 'Hello ' . $to; } } $server = new SoapServer('HelloWorld.wsdl', array('trace' => 1)); $server->setClass('hello_world'); if ($_SERVER["REQUEST_METHOD"] == "POST") { $server->handle(); } else { echo "This SOAP server can handle following functions: <br />"; $functions = $server->getFunctions(); foreach($functions as $func) { echo $func . "<br />"; } } ?> Client: <?php $client = new SoapClient('http://davey.synapticmedia.net/php-mag/shafikdavey_automaticwebservices/src/HelloWorld.wsdl', array('trace' => 1)); try { echo $client->hello('davey'); echo $client->__getLastRequestHeaders(); echo "\n"; echo "\n"; echo $client->__getLastRequest(); echo "\n"; echo "\n"; echo $client->__getLastResponse(); } catch (Exception $e) { echo $e; echo "\n"; echo "\n"; echo $client->__getLastRequestHeaders(); echo "\n"; echo "\n"; echo $client->__getLastRequest(); echo "\n";echo "\n"; echo $client->__getLastResponse(); } ?> Expected result: ---------------- "Hello davey" Actual result: -------------- returns NULL Headers: POST /php-mag/shafikdavey_automaticwebservices/src/Listing%201.php HTTP/1.1 Host: davey.synapticmedia.net Connection: Keep-Alive User-Agent: PHP SOAP 0.1 Content-Type: text/xml; charset="utf-8" SOAPAction: "http://davey.synapticmedia.net/php-mag/shafikdavey_automaticwebservices/src/Listing%201.php#hello" Content-Length: 430 Request: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <to xsi:type="xsd:string">davey</to> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Response: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <helloReturn xsi:type="xsd:string">Hello davey</helloReturn> </SOAP-ENV:Body> </SOAP-ENV:Envelope> -- Edit bug report at http://bugs.php.net/?id=29844&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29844&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=29844&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=29844&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=29844&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29844&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29844&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29844&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29844&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29844&r=support Expected behavior: http://bugs.php.net/fix.php?id=29844&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29844&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29844&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29844&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29844&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29844&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29844&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29844&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29844&r=float

« previous php.bugs (#65259) next »