|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37790 SOAP response for associative array is different on ubuntu 6.06
Submitted: 2006-06-12 19:00 UTC Modified: 2006-06-19 14:21 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: jerome at jeremyknope dot com Assigned:
Status: Closed Package: SOAP related
PHP Version: 5.1.4 OS: kubuntu 6.06 Dapper
Private report: No CVE-ID: None
 [2006-06-12 19:00 UTC] jerome at jeremyknope dot com
When upgrading to Kubuntu or Ubuntu 6.06 (or even previous 
Dapper Dragon pre-releases), SOAP extension in PHP 5.1.4 stops 
functioning the way it used to regarding the XML responses.  
Associative arrays no longer return a XML response that 
specifies type.

Reproduce code:
class MyService {
function getLists() {
   $out = array(
         'id' => 12,
         'name' => 'My New List'
   return $out;
In a client page:
$result = $client->getLists();
$result will be stdClass stuff on 'broken' setup, with dapper.

Expected result:
Snippet of XML response from a $client->getLists() call:

			<getListsReturn SOAP-ENC:arrayType="ns2:Map[1]" 
				<item xsi:type="ns2:Map">
						<key xsi:type="xsd:string">id</key>
						<value xsi:type="xsd:string">12</
						<key xsi:type="xsd:string">name</
						<value xsi:type="xsd:string">My New 
Result variable should be:
    [0] => Array
            [id] => 12
            [name] => My New List


Actual result:
Actual result, missing type attributes:
						<value>My New List</value>
Actual $result variable on dapper:
stdClass Object
    [item] => stdClass Object
            [item] => Array
                    [0] => stdClass Object
                            [key] => id
                            [value] => 20

                    [1] => stdClass Object
                            [key] => name
                            [value] => Test Site List





Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-06-12 19:08 UTC] jerome at jeremyknope dot com
Just wanted to add that I fiddled around with this quite a bit 
before dapper was out, basically I only could fine that 
libxml2 was used by SOAP and different versions of libxml2 
didn't change behavior.  Guessing SOAP extension is behaving 
weird due to some other system library that's commonly used.  
Re-compiling SOAP extension and PHP was something I tried but 
had no affect. this iteration was the already installed PHP 
that I built while in ubuntu breezy 5.10
 [2006-06-13 13:28 UTC] m dot leuffen at i-line dot net

since updating to PHP 5.1.4 on Debian my Java Client refuses operations returning complex data-types:

Exception from Netbeans Web Service Client:
Runtime exception; nested exception is: Invalid Array-Type: 'arraytype'

With PHP 5.1.2 this worked fine.

To me it seems as if PHP encodes the wrong way if a Struct contains a array of Basic Datatypes.

 [2006-06-19 12:45 UTC]
Please try using this CVS snapshot:
For Windows:

 [2006-06-19 13:53 UTC] jerome at jeremyknope dot com
Excellent, the PHP 5.2 cvs snapshot you linked successfully 
handled my SOAP service that was breaking with 5.1.4 on 
Dapper.  Glad to see this is resolved in future release of 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 22 19:01:31 2024 UTC