Public bug reported:

>From http://bugs.php.net/bug.php?id=37790
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->getLists();
$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:getListsResponse>
                        <getListsReturn SOAP-ENC:arrayType="ns2:Map[1]" 
xsi:type="SOAP-ENC:Array">
                                <item xsi:type="ns2:Map">
                                        <item>
                                                <key 
xsi:type="xsd:string">id</key>
                                                <value 
xsi:type="xsd:string">12</
value>
                                        </item>
                                        <item>
                                                <key 
xsi:type="xsd:string">name</
key>
                                                <value xsi:type="xsd:string">My 
New 
List</value>
                                        </item>
                                </item>
                        </getListsReturn>
                </ns1:getListsResponse>
        </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:getListsResponse>
                        <getListsReturn>
                                <item>
                                        <item>
                                                <key>id</key>
                                                <value>12</value>
                                        </item>
                                        <item>
                                                <key>name</key>
                                                <value>My New List</value>
                                        </item>
                                </item>
                        </getListsReturn>
                </ns1:getListsResponse>
        </SOAP-ENV:Body>
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
                        )

                )

        )

)

** Affects: php5 (Ubuntu)
     Importance: Untriaged
         Status: Unconfirmed

-- 
SOAP response for associative array is different on ubuntu 6.06
https://launchpad.net/bugs/52866

--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to