From: smr at kerridge dot com Operating system: Win XP PHP version: 5.1.0b2 PHP Bug Type: SOAP related Bug description: SOAP Client not parsing boolean types correctly
Description: ------------ I believe that there is a problem with the SOAP client in that it is not correctly parsing parameters that are specified in teh WSDL as xsd:boolean. The app that I am connecting to requires boolean values of true and false, however PHP soap is translating true to 1 and false to blank/null. Reproduce code: --------------- SoapServer.php <?php $quotes = array( "ibm" => 99.42 ); function getQuote($booltest, $symbol) { global $quotes; return $quotes[$symbol] . " And the boolean value is {$booltest}"; } ini_set("soap.wsdl_cache_enabled", "0"); $server = new SoapServer("stockquote.wsdl"); $server->addFunction("getQuote"); $server->handle(); ?> SoapClient.php <?php $client = new SoapClient("stockquote.wsdl"); print($client->getQuote(false,"ibm")); ?> Expected result: ---------------- NB: You will need to create a WSDL for the above. Use the one from Dmitry Stogov's examples and change: <message name='getQuoteRequest'> <part name='booltest' type='xsd:boolean'/> <part name='symbol' type='xsd:string'/> </message> <message name='getQuoteResponse'> <part name='Result' type='xsd:string'/> </message> Expected result: 99.42 And the boolean value is false Actual result: -------------- 99.42 And the boolean value is -- Edit bug report at http://bugs.php.net/?id=33753&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33753&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33753&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33753&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33753&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33753&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33753&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33753&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33753&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33753&r=support Expected behavior: http://bugs.php.net/fix.php?id=33753&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33753&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33753&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33753&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33753&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33753&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33753&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33753&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33753&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33753&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33753&r=mysqlcfg