|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-01-06 08:46 UTC] 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> PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 18:00:02 2025 UTC |
I use PHP 5.3.5 (from backports) in Debian GNU/Linux 5.0.7 Lenny. My resoults: PHP SOAP client with Apache2 http request ========================================= kayapo@ponyfarm:~$ wget http***kayapo.dev.molnaristvan.eu/client.php -O - --2011-01-23 10:56:44-- http***kayapo.dev.molnaristvan.eu/client.php kayapo.dev.molnaristvan.eu feloldása… 192.168.69.60 Csatlakozás a következőhöz: kayapo.dev.molnaristvan.eu[192.168.69.60]:80… kapcsolódva. HTTP kérés elküldve, várakozás válaszra… 200 OK Hossz: 682 [text/html] Mentés ide: „STDOUT” 0% [ ] 0 --.-K/s --- test --- REQUEST: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http***schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:test><firstUser id="ref1"><userId>1</userId><userName>username</userName></firstUser><firstUser href="#ref1"/></SOAP-ENV:test></SOAP-ENV:Body></SOAP-ENV:Envelope> RESPONSE MSG: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http***schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:testResponse><response/></SOAP-ENV:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> RESPONSE: object(User)#3 (2) { ["userId":"User":private]=> NULL ["userName":"User":private]=> NULL } 100%[===================================================================================================================================================================================================>] 682 --.-K/s idő 0s 2011-01-23 10:56:44 (115 MB/s) -- kiírva a szabványos kimenetre [682/682] PHP SOAP client from command line ================================= kayapo@www:~/workspace/site/frontend$ php client.php --- test --- REQUEST: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http***schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:test><firstUser id="ref1"><userId>1</userId><userName>username</userName></firstUser><firstUser href="#ref1"/></SOAP-ENV:test></SOAP-ENV:Body></SOAP-ENV:Envelope> RESPONSE MSG: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http***schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:testResponse><response/></SOAP-ENV:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> RESPONSE: object(User)#3 (2) { ["userId":"User":private]=> NULL ["userName":"User":private]=> NULL }