#38665 [Opn->Asn]: SOAP calls constructor twice when returning "void"
| From: | tony2001@php.net | Date: | Thu, 31 Aug 2006 08:26:38 +0000 |
| Subject: | #38665 [Opn->Asn]: SOAP calls constructor twice when returning "void" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-101559@lists.php.net to get a copy of this message | ||
ID: 38665
Updated by: tony2001@php.net
Reported By: jsgoupil@php.net
-Status: Open
+Status: Assigned
Bug Type: SOAP related
Operating System: WinXP
PHP Version: 5.1.6
-Assigned To:
+Assigned To: dmitry
New Comment:
Assigned to the maintainer.
Previous Comments:
------------------------------------------------------------------------
[2006-08-31 07:59:41] jsgoupil@php.net
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 this bug report at http://bugs.php.net/?id=38665&edit=1