|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38100 Arrays don't get deserialized properly in a php soap client
Submitted: 2006-07-14 06:36 UTC Modified: 2006-07-24 07:25 UTC
From: nnaoumov at gridapp dot com Assigned: dmitry (profile)
Status: Not a bug Package: SOAP related
PHP Version: 5CVS-2006-07-14 (snap) OS: redhat 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: nnaoumov at gridapp dot com
New email:
PHP Version: OS:


 [2006-07-14 06:36 UTC] nnaoumov at gridapp dot com
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:
$client = new SoapClient("php-array.wsdl", array("trace"=>1, "exceptions"=>1) );

$param = 5;
$rs = $client->noop(   new SoapParam($param, "num")  );
#echo $client->__getLastResponse());

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="" xmlns:SOAP-ENC="" xmlns:xsi="" xmlns:xsd="" xmlns:mgrin="urn:myns-internal"><SOAP-ENV:Body SOAP-ENV:encodingStyle=""><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:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-07-14 06:38 UTC] nnaoumov at gridapp dot com
Btw, initially I had this problem with php 5.1.2 but then I compiled the daily snapshot for php 5.2 and it's still there
 [2006-07-14 10:05 UTC]
Please post "php-array.wsdl" or send it to me by email.
 [2006-07-14 12:59 UTC] nnaoumov at gridapp dot com
I just emailed you two wsdl files that I tried it with. One was the original gsoap generated wsdl file and the other is one that I played around a bit with.
 [2006-07-19 08:20 UTC]
Seems I lost your email. :(
 [2006-07-19 13:54 UTC] nnaoumov at gridapp dot com
 [2006-07-19 14:16 UTC]
Sorry, but I didn't get it again.
Could you put it somewhere in the web and provide a link?
 [2006-07-19 15:22 UTC] nnaoumov at gridapp dot com
here it is:
 [2006-07-24 07:25 UTC]
The problem is in WSDL/SOAP-response inconsistency.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Mon Sep 26 13:05:56 2022 UTC