SOAP results aren't parsed correctly

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

Description:
------------
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
http://www.newsblob.com/nusoap/qweb.php

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

Reproduce code:
---------------
<?php
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('http://www.newsblob.com/qweb.wsdl',
                         array('trace' => 1,
                               'exceptions' => 1));
//ok try and get the host struct
$host = $client->qwebGetHostInfo();
xxx($host);


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) "127.0.0.1" }



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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports

 [2004-10-05 18:03 UTC] dmitry@php.net

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>.