Issue Details (XML | Word | Printable)

Key: AXIS-2454
Type: Bug Bug
Status: Open Open
Priority: Blocker Blocker
Assignee: Unassigned
Reporter: Greg Tassone
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Axis

Using Arrays results in malformed XML ([0,unbounded]) - Using Doc-Literal Wrapped

Created: 31/Mar/06 07:27 AM   Updated: 31/Mar/06 10:11 AM
Return to search
Component/s: Serialization/Deserialization
Affects Version/s: 1.3
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File Licensed for inclusion in ASF works ArraySerializer.java 2006-03-31 10:11 AM Eric Schwarzenbach 21 kB
Environment: Tomcat 5.5, Sun JDK 1.5.06 on Linux


 Description  « Hide
Axis 1.3 is encoding my Array-enabled messages with malformed/broken XML (example below). This problem has been reported before in slightly modified ways, but for the CastorSerializer (which I am not using). For more on that see bug #AXIS-2135 in this system.

I am probably using standard serializers, as I'm just trying to return an unbounded array from the service. My service uses the Doc-Literal/Wrapped style. Returning an array results in the following type of return structure:

<myType[0,unbounded]>
<stuff ... />
</myType[0,unbounded]>
<myType[0,unbounded]>
<stuff ... />
</myType[0,unbounded]>

(A full example is below.)

The WSDL snippet that produces this is:

<xsd:element name="getAlarmListResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="tns:alarm" maxOccurs="unbounded" minOccurs="0"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

<xsd:element name="alarm" nillable="true">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="alarmTime" type="xsd:long" nillable="false"></xsd:element>
<xsd:element name="latestEventTime" type="xsd:long" nillable="false"></xsd:element>
<xsd:element name="lastUpdateTime" type="xsd:long" nillable="false"></xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
--------------------------------------------

Thanks for any help you can provide with this. We have a major production implementation that is stopped while we attempt to work around this issue.

--------------------------------------------

Here is a detailed example of the the SOAP response we are receiving from the Axis 1.3 server:

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Date: Thu, 30 Mar 2006 05:10:54 GMT
Connection: close

<?xml version="1.0" encoding="utf-8"?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
         <getAlarmListResponse xmlns="http://vtracsystems.net/ResponseCenterService">
            <alarm[0,unbounded]>
               <alarmTime xmlns="">1142220126</alarmTime>
               <latestEventTime xmlns="">1142220265</latestEventTime>
               <lastUpdateTime xmlns="">1142220265</lastUpdateTime>
            </alarm[0,unbounded]>
            <alarm[0,unbounded]>
               <alarmTime xmlns="">1142220266</alarmTime>
               <latestEventTime xmlns="">1142220508</latestEventTime>
               <lastUpdateTime xmlns="">1142220508</lastUpdateTime>
            </alarm[0,unbounded]>
            <alarm[0,unbounded]>
               <alarmTime xmlns="">1142220901</alarmTime>
               <latestEventTime xmlns="">1142221208</latestEventTime>
               <lastUpdateTime xmlns="">1142221208</lastUpdateTime>
            </alarm[0,unbounded]>
         </getAlarmListResponse>
      </soapenv:Body>
   </soapenv:Envelope>


 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Greg Tassone added a comment - 31/Mar/06 07:51 AM
FYI: There is a patch in the referenced bug for that particular case of this problem. It may be helpful to you in determining the cause of the problem, and possibly for fixing this one as well.

Eric Schwarzenbach added a comment - 31/Mar/06 10:10 AM
When I had this sympton and the patch for the other bug didn't help me, I debugged it and was able to fix the problem by patching org.apache.axis.encoding.ser.ArraySerializer. I meant to submit it as a patch but I'm afraid I got busy and never got back to it (nor am I confident my patch fixes it the right place, or whether it has an earlier source). In case it helps, I'm attaching my version of the file.

Eric Schwarzenbach added a comment - 31/Mar/06 10:11 AM
possible fix

Eric Schwarzenbach made changes - 31/Mar/06 10:11 AM
Field Original Value New Value
Attachment ArraySerializer.java [ 12324791 ]