php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43015 Wrong XML when same object is repeated
Submitted: 2007-10-18 09:47 UTC Modified: 2007-10-26 11:01 UTC
From: magne at myrtveit dot com Assigned: dmitry (profile)
Status: Closed Package: SOAP related
PHP Version: 5.2.4 OS: Windows XP
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: magne at myrtveit dot com
New email:
PHP Version: OS:

 

 [2007-10-18 09:47 UTC] magne at myrtveit dot com
Description:
------------
This bug is reported before as bug #41566. It now has a status of Closed, and according to the text it is fixed in PHP 5.2.4. I had problems with this bug in PHP 5.2.3 and just installed PHP 5.3.4. The problem seems to be there still.

Best regards,
Magne

Expected result:
----------------
...
   <SOAP-ENV:Body>
      <ns1:getRegulationsResponse>
         <getRegulationsReturn xsi:type="ns1:RegulationsArray">
            <regulations xsi:type="ns1:Regulations">
               <id xsi:type="xsd:integer">1</id>
               <name xsi:type="xsd:string">Arbeidstilsynet</name>
               <inspectionIntervals xsi:type="ns1:InspectionInterval" id="ref1">
                  <inspectionTypeId xsi:type="xsd:integer">2</inspectionTypeId>
                  <intervals xsi:type="xsd:int">1</intervals>
               </inspectionIntervals>
               <inspectionIntervals xsi:type="ns1:InspectionInterval" id="ref2">
                  <inspectionTypeId xsi:type="xsd:integer">3</inspectionTypeId>
                  <intervals xsi:type="xsd:int">1</intervals>
               </inspectionIntervals>
            </regulations>
            <regulations xsi:type="ns1:Regulations">
               <id xsi:type="xsd:integer">5</id>
               <name xsi:type="xsd:string">Best. nr 522 - Maskindir.</name>
               <inspectionIntervals href="#ref1"/>
               <inspectionIntervals href="#ref2"/>
            </regulations>
            <regulations xsi:type="ns1:Regulations">
               <id xsi:type="xsd:integer">6</id>
               <name xsi:type="xsd:string">Best.nr 523 - Fallsikring</name>
               <inspectionIntervals href="#ref1"/>
               <inspectionIntervals href="#ref2"/>
            </regulations>
... (etc)

Actual result:
--------------
...
   <SOAP-ENV:Body>
      <ns1:getRegulationsResponse>
         <getRegulationsReturn xsi:type="ns1:RegulationsArray">
            <regulations xsi:type="ns1:Regulations">
               <id xsi:type="xsd:integer">1</id>
               <name xsi:type="xsd:string">Arbeidstilsynet</name>
               <inspectionIntervals xsi:type="ns1:InspectionInterval" id="ref1">
                  <inspectionTypeId xsi:type="xsd:integer">2</inspectionTypeId>
                  <intervals xsi:type="xsd:int">1</intervals>
               </inspectionIntervals>
               <inspectionIntervals xsi:type="ns1:InspectionInterval" id="ref2">
                  <inspectionTypeId xsi:type="xsd:integer">3</inspectionTypeId>
                  <intervals xsi:type="xsd:int">1</intervals>
               </inspectionIntervals>
            </regulations>
            <regulations xsi:type="ns1:Regulations">
               <id xsi:type="xsd:integer">5</id>
               <name xsi:type="xsd:string">Best. nr 522 - Maskindir.</name>
               <inspectionIntervals href="#ref1"/>
               <inspectionIntervals href="#ref2"/>
            </regulations>
            <regulations xsi:type="ns1:Regulations">
               <id xsi:type="xsd:integer">6</id>
               <name xsi:type="xsd:string">Best.nr 523 - Fallsikring</name>
               <inspectionIntervals href="ref1"/>
               <inspectionIntervals href="ref2"/>
            </regulations>
... (etc)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-18 13:30 UTC] johannes@php.net
Dmitry, can yu check this out?
 [2007-10-24 07:00 UTC] dmitry@php.net
I cannot reproduce the bug #41566.

$ make test TESTS=ext/soap/tests/bugs/bug41566.phpt
=====================================================================
Running selected tests.
PASS Bug #41566 (SOAP Server not properly generating href attributes) [ext/soap/tests/bugs/bug41566.phpt]
=====================================================================

And you didn't provide a test script to reproduce it.

Anyway, I belive the bug is fixed.
May be you tested wrong version?
 [2007-10-25 08:18 UTC] magne at myrtveit dot com
phpinfo() returns PHP Version 5.2.4.

I will try to make a test script as soon as I can free up the time to write it (I guess I need to create three files (WSDL, XSD and PHP) and a request string in order to create a test case).

I have made a workaround for my own service to work; I just include a unique serial number with each instance of the class that caused problems. This effectively switches off the use 'href' in the SOAP response.

Thanks for your effort.
 [2007-10-25 13:35 UTC] jani@php.net
Please provide the example script.
 [2007-10-26 11:02 UTC] magne at myrtveit dot com
Sorry: Our mistake. It now works.

Here is the story...

I made a test script, as you requested, and it produced the error when run on my client's server.

To be on the safe side, I tested it on an internal server where I work, and now the response was Ok.

The explanation: My customer's IT department had upgraded PHP all right, but they forgot to upgrade the extension dll's, such as the soap module.

Kind regards,
Magne
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Oct 27 16:01:27 2024 UTC