From: nnaoumov at gridapp dot com Operating system: redhat 4 PHP version: 5CVS-2006-07-14 (snap) PHP Bug Type: SOAP related Bug description: Arrays don't get deserialized properly in a php soap client
Description: ------------ I wrote a small soap server in C++ (with gsoap) and a small php soap client. When I tried to send over an array of strings from the server to the client I only receieved the first value of the array. Reproduce code: --------------- <?php $client = new SoapClient("php-array.wsdl", array("trace"=>1, "exceptions"=>1) ); $param = 5; $rs = $client->noop( new SoapParam($param, "num") ); #echo $client->__getLastResponse()); print_r($rs); ?> The server is in C++ so I cant post it here but it is really simple and only provides the method noop which takes an integer and returns an array of as many strings as is the argument. Here is the output from getLastResponse which shows the soap msg sent from the server to the php client. If required I can post the wsdl file as well. <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mgrin="urn:myns-internal"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><mgrin:noopResponse><result xsi:type="xsd:string">test0</result><result xsi:type="xsd:string">test1</result><result xsi:type="xsd:string">test2</result><result xsi:type="xsd:string">test3</result><result xsi:type="xsd:string">test4</result></mgrin:noopResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> Expected result: ---------------- Array ( [0] => test0 [1] => test1 [2] => test2 [3] => test3 [4] => test4) Actual result: -------------- test0 -- Edit bug report at http://bugs.php.net/?id=38100&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=38100&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=38100&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=38100&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=38100&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=38100&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=38100&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=38100&r=needscript Try newer version: http://bugs.php.net/fix.php?id=38100&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=38100&r=support Expected behavior: http://bugs.php.net/fix.php?id=38100&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=38100&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=38100&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=38100&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38100&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=38100&r=dst IIS Stability: http://bugs.php.net/fix.php?id=38100&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=38100&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=38100&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=38100&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=38100&r=mysqlcfg