php.net |  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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: nnaoumov at gridapp dot com
New email:
PHP Version: OS:

 

 [2006-07-14 06:36 UTC] nnaoumov at gridapp dot com
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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] dmitry@php.net
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] dmitry@php.net
Seems I lost your email. :(
 [2006-07-19 13:54 UTC] nnaoumov at gridapp dot com
resent
 [2006-07-19 14:16 UTC] dmitry@php.net
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:
http://cpp.sourceforge.net/?show=17898
 [2006-07-24 07:25 UTC] dmitry@php.net
The problem is in WSDL/SOAP-response inconsistency.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 23:01:26 2024 UTC