|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-14 07:10 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 22:00:01 2025 UTC |
Description: ------------ SoapServer response xml contains wrong references to node ids. With PHP 5.2.3 we got this for returned items... <item xsi:type="ns1:User" id="ref1"> <sName xsi:type="xsd:string">userA</sName> </item> <item href="#ref1"/> <item href="ref1"/> <-- See the missing '#' char <item href="ref1"/> <-- See the missing '#' char Manually changing the response xml to include the '#' solves the problem: <item xsi:type="ns1:User" id="ref1"> <sName xsi:type="xsd:string">userA</sName> </item> <item href="#ref1"/> <item href="#ref1"/> <item href="#ref1"/> Reproduce code: --------------- To reproduce this problem try to return the same object many times on any SOAP Service. /** @return User[] */ function UserSoapService() { $aUser = new User(); $aUser->sName = 'newUser'; $aUsers = Array(); $aUsers[] = $aUser; $aUsers[] = $aUser; $aUsers[] = $aUser; $aUsers[] = $aUser; return $aUsers; } /* Simple User definition */ Class User { /** @var string */ public $sName; } Expected result: ---------------- Array with 4 times the same user object. Actual result: -------------- Exception of class SoapFault SOAP-ERROR: Encoding: External reference 'ref1'