From: [EMAIL PROTECTED] Operating system: WinXP PHP version: 5.1.6 PHP Bug Type: SOAP related Bug description: SOAP calls constructor twice when returning "void"
Description: ------------ I found a weird bug with SOAP/WSDL. When calling a method which returns nothing (no output) at first time, the second method will call the constructor of the class again even if we are using the Persistence with SESSION. Here 3 files: - test.wsdl - test.server.php - test.client.php You have to change the url at the end of the test.wsdl to test this script In the WSDL, the method "getTest1" returns nothing and "getTest2" returns a string. If you run the script test.client.php now, you will get a file test.txt containing : Call Constructor Call Method 2 Call Method 1 Now, swap the rows var_dump($clientSOAP->getTest2()); var_dump($clientSOAP->getTest1()); and now the test.txt contains : Call Constructor Call Method 1 Call Constructor Call Method 2 Reproduce code: --------------- test.server.php http://pastebin.com/780399 test.client.php http://pastebin.com/780404 test.wsdl http://pastebin.com/780402 -- Edit bug report at http://bugs.php.net/?id=38665&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38665&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38665&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38665&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38665&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38665&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38665&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38665&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38665&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38665&r=support Expected behavior: http://bugs.php.net/fix.php?id=38665&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38665&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38665&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38665&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38665&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38665&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38665&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38665&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38665&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38665&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38665&r=mysqlcfg