SOAP response for associative array is different on ubuntu 6.06

Bug #52866 reported by Mike
22
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Fix Released
Undecided
Unassigned
Dapper
Fix Released
Undecided
Unassigned

Bug Description

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
                        )

                )

        )

)

Revision history for this message
Ingo Paschke (paschke) wrote :

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.

Revision history for this message
Mike (mail-mbaierl) wrote :

Duplicate or non-duplicate, when will this be fixed? This was reported on 2006-07-13 and noone ever had a look - when will there be new packages for 6.06 LTS (=Long Term Support, does this mean the bug fixes will take longer? :) )

Revision history for this message
p3net (admin-p3net) wrote :

Hello,

It's been quite some time since we've heard anything from you regarding this bug. Is it still an issue or has it been resolved?

Changed in php5:
assignee: nobody → admin-p3net
status: Unconfirmed → Needs Info
Revision history for this message
Ingo Paschke (paschke) wrote : Re: [Bug 52866] Re: SOAP response for associative array is different on ubuntu 6.06

Hi!

Steven Ross schrieb:

> It's been quite some time since we've heard anything from you regarding
> this bug. Is it still an issue or has it been resolved?
>
> ** Changed in: php5 (Ubuntu)
> Assignee: (unassigned) => Steven Ross
> Status: Unconfirmed => Needs Info

This is definitely still an issue on Dapper, so it would be much
appreciated if you could include the proposed fix.

Kind regards,
Ingo.

--
Ingo Paschke DIE ZEIT
ZEIT Verlag Gerd Bucerius Gmbh & Co KG Pressehaus, Speersort 1
<email address hidden> 20095 Hamburg
Tel. +49 40 3280-1071 Fax +49 40 3280-587

___________________________________________
Zeitverlag Gerd Bucerius GmbH & Co. KG
20079 Hamburg
Geschäftsführer: Dr. Rainer Esser
Aufsichtsratsvorsitzender : Dr. Stefan von Holtzbrinck
Handelsregister Hamburg HRA 91123
Amtsgericht Hamburg

Revision history for this message
p3net (admin-p3net) wrote :

I'm going ahead and setting this as confirmed due to feedback from PHP's team. They recommend (as per the bug report filed there) to use the latest CVS snapshot, which seems to resolve it. The package maintainer should be able to correct this bug. You can grab the latest snapshot here <http://snaps.php.net/php5.2-latest.tar.gz>

Changed in php5:
assignee: admin-p3net → nobody
status: Needs Info → Confirmed
Revision history for this message
Mike (mail-mbaierl) wrote :

Hi Steven,
I don't know. I Upgraded to 7.04 and there it works. If there was no
update in 6.06 I would expect that it's still broken.

Mike

Steven Ross wrote:
> Hello,
>
> It's been quite some time since we've heard anything from you regarding
> this bug. Is it still an issue or has it been resolved?
>
> ** Changed in: php5 (Ubuntu)
> Assignee: (unassigned) => Steven Ross
> Status: Unconfirmed => Needs Info
>

--
Michael Baierl
mbaierl.com http://mbaierl.com/

Revision history for this message
p3net (admin-p3net) wrote :

Mike,

I'm going to go ahead and wait for someone running 6.06 to comment on this bugs existence before I go ahead and take any action. I'm unable to test it myself and at this point am not able to verify what PHP package is included in 6.06 LTS currently.

Revision history for this message
Soren Hansen (soren) wrote :

I realise it's suboptimal, but does the PEAR SOAP module work instead?

Revision history for this message
Ingo Paschke (paschke) wrote :

Hi!

Soren Hansen schrieb:

> I realise it's suboptimal, but does the PEAR SOAP module work instead?

Probably, I've never tried this because it uses an incompatible API so I
would have to rewrite my application to use it.

Kind regards,
Ingo.

--
Ingo Paschke DIE ZEIT
ZEIT Verlag Gerd Bucerius Gmbh & Co KG Pressehaus, Speersort 1
<email address hidden> 20095 Hamburg
Tel. +49 40 3280-1071 Fax +49 40 3280-587

___________________________________________
Zeitverlag Gerd Bucerius GmbH & Co. KG
20079 Hamburg
Geschäftsführer: Dr. Rainer Esser
Aufsichtsratsvorsitzender : Dr. Stefan von Holtzbrinck
Handelsregister Hamburg HRA 91123
Amtsgericht Hamburg

Revision history for this message
Soren Hansen (soren) wrote :

On Wed, Aug 29, 2007 at 02:08:37PM -0000, Ingo Paschke wrote:
> > I realise it's suboptimal, but does the PEAR SOAP module work
> > instead?
> Probably, I've never tried this because it uses an incompatible API so
> I would have to rewrite my application to use it.

Ah, I thought they were API compatible. My mistake.

--
Soren Hansen
Ubuntu Server Team
http://www.ubuntu.com/

Revision history for this message
Michael Lex (mich-lex) wrote :

Hi!
I'm running Ubuntu 6.06 LTS and I can confirm: The bug still exists.

Regards,
Michael

Revision history for this message
Bernd Eidenschink (eidenschink) wrote :

Hi,

I can confirm the bug also. We have verified it with a setup of one dev system (non-Ubuntu, latest PHP) calling a 6.06 LTS and failing, but also two 6.06 LTS Ubuntu servers trying to call each other, but failing exactly because of the problem described above.

This seems to effectively break SOAP calls and therefor should be rated a serious bug. As 6.06 LTS is supported until 2011 waiting for the next LTS seems not to be an option.

Kind regards,
Bernd.

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - the Hardy Heron.

Changed in php5:
status: Confirmed → Fix Released
Revision history for this message
Mathias Gug (mathiaz) wrote :

I've nominated the bug for dapper as it may fit a StableReleaseUpdates (see https://wiki.ubuntu.com/StableReleaseUpdates) under the "severe regressions from the previous release of Ubuntu" criteria.

As mentionned in bug 65554, a candidate patch can be found here: http://blog.zeit.de/108-xsi-namespace.patch

Relevant upstream bugs:
 * http://bugs.php.net/bug.php?id=37523
 * http://bugs.php.net/bug.php?id=37790

Upstream commit:
 * http://cvs.php.net/viewvc.cgi/php-src/ext/soap/php_encoding.c?revision=1.127&view=markup

Revision history for this message
Daniel Hahler (blueyed) wrote :

Subscribed ubuntu-sru

Revision history for this message
Martin Pitt (pitti) wrote :

This patch is reasonably isloated and I agree that it is SRU worthy. Please prepare an SRU and make sure that the SOAP tests in the test suite don't show any regressions (please compare output before and after patching). If they pass the testsuite and the test case in the description, it's ready for upload.

If you need a sponsor, I can do that. Just attach the complete debdiff. Thank you!

Changed in php5:
status: New → Confirmed
assignee: nobody → mathiaz
Revision history for this message
Mathias Gug (mathiaz) wrote :

I've attached a debdiff that include the upstream commit.

I've also run the tests included in ext/soap/tests/ and compared the result with ubuntu3.10:

$ diff -u 5.1.2-1ubuntu3.10 5.1.2-1ubuntu3.11
--- 5.1.2-1ubuntu3.10 2008-01-21 18:23:12.000000000 +0000
+++ 5.1.2-1ubuntu3.11 2008-01-23 15:46:10.000000000 +0000
@@ -8,10 +8,10 @@
 Number of tests : 2116 1597
 Tests skipped : 519 ( 24.5%) --------
 Tests warned : 0 ( 0.0%) ( 0.0%)
-Tests failed : 241 ( 11.4%) ( 15.1%)
-Tests passed : 1356 ( 64.1%) ( 84.9%)
+Tests failed : 126 ( 6.0%) ( 7.9%)
+Tests passed : 1471 ( 69.5%) ( 92.1%)
 ---------------------------------------------------------------------
-Time taken : 151 seconds
+Time taken : 169 seconds
 =====================================================================

 =====================================================================

[...]

Most of the tests that weren't successfull in 3.10, but successfull 3.11 are soap related.

The only test that fails in 3.11 and not in 3.10 is:
date_sunrise() and date_sunset() functions [ext/standard/tests/general_functions/sunfuncts.phpt]
(which is a problem with the test suite itself).

I haven't created a test case to cover the bug reported here. If someone can post all the files that are needed, it would be appreciated.

I've also linked a bzr branch for qa-regression-testing that adds the result of the php5 testrun.

Changed in php5:
status: Confirmed → In Progress
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into dapper-proposed. Please test, and also check the build log for the test cases. Thank you!

Changed in php5:
status: In Progress → Fix Committed
Mathias Gug (mathiaz)
Changed in php5:
assignee: mathiaz → nobody
Revision history for this message
Martin Pitt (pitti) wrote :

Any chance of testing this? This is sitting in proposed for four months already.

Revision history for this message
Steve Beattie (sbeattie) wrote :

I successfully reproduced the faulty behavior in the version of php5 in dapper-updates, 5.1.2-1ubuntu3.10. I then upgraded the php5 related packages to version in dapper-proposed and can confirm that these do correct the behavior above.

I've also re-run the php5 component from the qa-regression-testing bzr branch and verified that that the security issues test for there are still addressed. Beyond that, I have not performed any additional regresison testing of the package.

I'm attaching the test files I created to test the issue.

Revision history for this message
Steve Beattie (sbeattie) wrote :

Here's the client side script.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to dapper-updates.

Changed in php5:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.