|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30175 SOAP results aren't parsed correctly
Submitted: 2004-09-21 01:39 UTC Modified: 2004-10-05 18:03 UTC
From: waboring at 3gstech dot com Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5CVS-2004-09-21 (dev) OS: linux
Private report: No CVE-ID: None
 [2004-09-21 01:39 UTC] waboring at 3gstech dot com
I have a complex type returned in a SOAP reply and I am getting an array with null values back from the soap client.

The array that is return has the correct keys, but the values are always null.  The response has the values.  I tried this with NuSOAP and it works fine.

The NuSoap script that works is at

I don't have a publicly available php5 install, but here is the code that fails.

Reproduce code:
ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache

function xxx($var) {
 echo "<xmp>\n";
 print var_dump($var, TRUE);
 echo "</xmp>\n";

$client = new SoapClient('',
                         array('trace' => 1,
                               'exceptions' => 1));
//ok try and get the host struct
$host = $client->qwebGetHostInfo();

echo "<br><br>Request : ".xxx($client->__getLastRequest(), TRUE);
echo "<br>Response : ".xxx($client->__getLastResponse(), TRUE);

Expected result:
I should see:

array(3) { ["name"]=>  string(25) "blah blah some name field" ["shortDescription"]=>  string(43) "This is a description. more blah blah blah" ["ipAddress"]=>  string(9) "" }

Actual result:
array(3) { ["name"]=>  NULL ["shortDescription"]=> NULL ["ipAddress"]=>  NULL }


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-21 01:45 UTC] waboring at 3gstech dot com
The entire response is

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="" xmlns:SOAP-ENC="" xmlns:xsi="" xmlns:xsd="" xmlns:ns1="urn:qweb"><SOAP-ENV:Body SOAP-ENV:encodingStyle="" id="_0"><ns1:HostInfo xsi:type="ns1:HostInfo"><name xsi:type="xsd:string">blah blah some name field</name><shortDescription xsi:type="xsd:string">This is a description. more blah blah blah</shortDescription><ipAddress xsi:type="xsd:string"></ipAddress></ns1:HostInfo></SOAP-ENV:Body></SOAP-ENV:Envelope>
 [2004-10-05 18:03 UTC]
Fixed in CVS HEAD and PHP_5_0.

But I am not sure about proper SOAP result.
From my point of view it should contain <qwebGetHostInfoResponse> instead of <HostInfo>.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Sep 28 17:05:52 2022 UTC