SOAP response for associative array is different on ubuntu 6.06
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php5 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Dapper |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
From http://
This is really annoying and prevents us from developing Webservices with Ubuntu 6.06 LTS!
Description:
------------
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(
array(
'id' => 12,
'name' => 'My New List'
)
);
return $out;
}
}
In a client page:
$result = $client-
$result will be stdClass stuff on 'broken' setup, with dapper.
Expected result:
----------------
Snippet of XML response from a $client->getLists() call:
<SOAP-ENV:Body>
<ns1:
<getListsReturn SOAP-ENC:
xsi:type=
<item xsi:type="ns2:Map">
<item>
<key xsi:type=
<value xsi:type=
value>
</item>
<item>
<key xsi:type=
key>
<value xsi:type=
List</value>
</item>
</item>
</getListsRe
</ns1:
</SOAP-ENV:Body>
Result variable should be:
Array
(
[0] => Array
(
[id] => 12
[name] => My New List
)
)
Actual result:
--------------
Actual result, missing type attributes:
<SOAP-ENV:Body>
<ns1:
<getListsReturn>
<item>
<item>
<key>id</key>
<
</item>
<item>
<
<value>My New List</value>
</item>
</item>
</getListsRe
</ns1:
</SOAP-ENV:Body>
Actual $result variable on dapper:
stdClass Object
(
[item] => stdClass Object
(
[item] => Array
(
)
)
)
Related branches
Changed in php5: | |
assignee: | mathiaz → nobody |
My bug report https:/ /launchpad. net/distros/ ubuntu/ +source/ php5/+bug/ 65554 is actually a duplicate. Oops.
See the proposed fix there.
This is really annoying, it forces us to maintain our own php5-package.