|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-21 17:03 UTC] dmitry@php.net
[2006-01-16 01:22 UTC] marc dot greenstock at gmail dot com
[2006-02-03 15:48 UTC] PiRanha_777 at yahoo dot fr
[2008-07-07 11:09 UTC] iant at clickwt dot com
[2008-09-20 09:41 UTC] bramhavers at gmail dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 21:00:01 2025 UTC |
Description: ------------ Using PHP5's SoapClient to recieve a SOAP envelope that contains multiple instances of the same tag, the resulting object retains only the last item of the given tag name. E.G. Receiving a SOAP message containing: <dogs> <dog>Scooby</dog> <dog>Lassie</dog> <dog>Benji</dog> </dogs> Results in an object containing: [dogs] => stdClass Object ( [dog] => Benji ) I'm using a perl SOAP::Lite script for the server, and php5's SOAP for the client. When the tags are changed to be unique (e.g. <dog1>, <dog2>, <dog3>) all three examples are returned as expected. Reproduce code: --------------- [ TestFunction is a simple function that returns a SOAP envelope containing: <dogs> <dog>Scooby</dog> <dog>Lassie</dog> <dog>Benji</dog> </dogs> $client is the PHP5 SoapClient variable. ] $test = $client->__call('TestFunction', array($a)); echo '<pre>'; print_r($test); echo '</pre>'; Expected result: ---------------- stdClass Object ( [dogs] => array ( [0] => Scooby [1] => Lassie [2] => Benji ) ) Actual result: -------------- stdClass Object ( [dogs] => stdClass Object ( [dog] => Benji )