From: ronunism at hotmail dot com
Operating system: Fedora Core 1
PHP version: 5CVS-2004-05-07 (dev)
PHP Bug Type: SOAP related
Bug description: Duplicate Tags in SOAP message parsed incorrectly.
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
)
--
Edit bug report at http://bugs.php.net/?id=28321&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28321&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28321&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=28321&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=28321&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=28321&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=28321&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=28321&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=28321&r=support
Expected behavior: http://bugs.php.net/fix.php?id=28321&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=28321&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=28321&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=28321&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28321&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=28321&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=28321&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=28321&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28321&r=float