#30175 [Opn]: SOAP results aren't parsed correctly

From: Date: Mon, 20 Sep 2004 23:45:25 +0000
Subject: #30175 [Opn]: SOAP results aren't parsed correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-66469@lists.php.net to get a copy of this message
ID: 30175 User updated by: waboring at 3gstech dot com Reported By: waboring at 3gstech dot com Status: Open Bug Type: SOAP related Operating System: linux PHP Version: 5CVS-2004-09-21 (dev) New Comment: The entire response is <?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:ns1="urn:qweb"><SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 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">127.0.0.1</ipAddress></ns1:HostInfo></SOAP-ENV:Body></SOAP-ENV:Envelope> Previous Comments: ------------------------------------------------------------------------ [2004-09-21 01:39:36] 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 } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30175&edit=1

« previous php.bugs (#66469) next »