From:             jerome at jeremyknope dot com
Operating system: kubuntu 6.06 Dapper
PHP version:      5.1.4
PHP Bug Type:     SOAP related
Bug description:  SOAP response for associative array is different on ubuntu 
6.06

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
                        )

                )

        )

)

-- 
Edit bug report at http://bugs.php.net/?id=37790&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=37790&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=37790&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=37790&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=37790&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=37790&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=37790&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=37790&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=37790&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=37790&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=37790&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=37790&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=37790&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=37790&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=37790&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=37790&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=37790&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=37790&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=37790&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=37790&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=37790&r=mysqlcfg

Reply via email to