Bug #50675 [Com]: SoapClient can't handle object references correctly.

From: Date: Sat, 22 Jan 2011 23:10:52 +0000
Subject: Bug #50675 [Com]: SoapClient can't handle object references correctly.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-158089@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=50675&edit=1

 ID:                 50675
 Comment by:         bulk at janoszen dot hu
 Reported by:        margaritisz dot oresztesz at dotroll dot hu
 Summary:            SoapClient can't handle object references correctly.
 Status:             Open
 Type:               Bug
 Package:            SOAP related
 Operating System:   Linux
 PHP Version:        5.2.12
 Block user comment: N
 Private report:     N

 New Comment:

Confirmed in PHP 5.3.4, still the same bug. The only fix for us is
porting the SOAP library from 5.2.0, which has other, more manageable
bugs.


Previous Comments:
------------------------------------------------------------------------
[2010-07-06 07:20:53] bulk at janoszen dot hu

Is somebody looking into this?

------------------------------------------------------------------------
[2010-01-15 12:05:15] margaritisz dot oresztesz at dotroll dot hu

Package on the previous link is damaged.

Source code can be found at:
http://code.dotroll.com/files/bugreports/php-50675-soaprefs/soap.tar.gz

------------------------------------------------------------------------
[2010-01-13 13:53:38] srinatar@php.net

the client.php that you attached is tar.gz of the same server side code.

pl.attach / provide appropriate client reproduce code 

------------------------------------------------------------------------
[2010-01-06 08:46:33] margaritisz dot oresztesz at dotroll dot hu

Description:
------------
When sending the same object multiple times in a SOAP call, SoapClient
replaces the object with a href='..' object reference. However the
client generates the request envelope with an incorrect parameter name,
so the server does not get the referenced object.

Reproduce code:
---------------
Sources of a simple server and client could be found at the following
URL: http://charlie.extra.hu/php-soap/soap.tar.gz

If I run client.php, it gets back an object filled with null parameters.
It should recieve the first object sent to the server.
If I change the reference's parameter name to 'secondUser', the SOAP
response includes the correct object.

Expected result:
----------------
Expected the following soap envelope to be sent:

<SOAP-ENV:test>
  <firstUser id="ref1">
    <userId>1</userId>
    <userName>user</userName>
  </firstUser>
  <secondUser href="#ref1"/>
</SOAP-ENV:test>

Actual result:
--------------
Got this request:

<SOAP-ENV:test>
  <firstUser id="ref1">
    <userId>1</userId>
    <userName>user</userName>
  </firstUser>
  <firstUser href="#ref1"/>
</SOAP-ENV:test>


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=50675&edit=1


Thread (13 messages)

« previous php.bugs (#158089) next »