#37013 [Com]: server hangs when returning circular object references
| From: | michele dot manzato at verona dot miz dot it | Date: | Wed, 12 Apr 2006 12:25:39 +0000 |
| Subject: | #37013 [Com]: server hangs when returning circular object references | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95668@lists.php.net to get a copy of this message | ||
ID: 37013
Comment by: michele dot manzato at verona dot miz dot it
Reported By: hjiverson at plauditdesign dot com
Status: Assigned
Bug Type: SOAP related
Operating System: Gentoo Linux
PHP Version: 5CVS-2006-04-07 (snap)
Assigned To: dmitry
New Comment:
I can confirm this same bug under Win2K with PHP/5.1.2.
Previous Comments:
------------------------------------------------------------------------
[2006-04-10 12:28:03] sniper@php.net
Assigned to the maintainer.
------------------------------------------------------------------------
[2006-04-07 21:18:44] hjiverson at plauditdesign dot com
Description:
------------
When I return a graph of objects that has circular references (a tree
of categories, for example), the soap server gets stuck in an infinite
loop/recursion and hangs.
Reproduce code:
---------------
http://dev.plauditdesign.com/~hjiverson/drop/php-soap-multiref-bug.txt
Expected result:
----------------
The server should use mutliRefs and create references to each object.
Each object instance would be serialized one time and given a unique
ID, which is then pointed to each time an reference to that object is
encountered.
Something like this:
<getThingWithParentResponse>
<result href="#object1"/>
</getThingWithParentResponse>
...
<multiRef xsi:type="ThingWithParent" id="object1">
...
<parent xsi:nil="1"/>
<children>
<child href="#object2"/>
</children>
</multiRef>
<multiRef xsi:type="ThingWithParent" id="object2">
...
<parent href="#object1"/>
<children xsi:nil="1"/>
</multiRef>
Actual result:
--------------
php hangs
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37013&edit=1