axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jongjin Choi (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Created: (AXIS-1822) SOAPEnvelope's serialization of children is not ordered properly.
Date Fri, 18 Feb 2005 12:08:48 GMT
SOAPEnvelope's serialization of children is not ordered properly.
-----------------------------------------------------------------

         Key: AXIS-1822
         URL: http://issues.apache.org/jira/browse/AXIS-1822
     Project: Axis
        Type: Bug
    Reporter: Jongjin Choi


SOAPEnvelope's outputImpl() serializes the content of SOAPEnvelope.
But the serialization order is not valid.

For example, 

        SOAPMessage smsg = ... // SOAPMessage with SOAP Header and body            
        SOAPPart sp = smsg.getSOAPPart();
        SOAPEnvelope envelope = sp.getEnvelope();
        envelope.addTextNode("<!-- This is a comment -->");
	smsg.writeTo(System.out);

The expected output will be :

  <soap:Envelope>
    <soap:Header>
      ...
    </soap:Header>
    <soap:Body>
    </soap:Body>
    <!-- This is a comment -->
  </soap:Envelope>

But the actual output is :

  <soap:Envelope>
    <!-- This is a comment -->
    <soap:Header>
      ...
    </soap:Header>
    <soap:Body>
    </soap:Body>
  </soap:Envelope>

The current serialization order of SOAPEnvelope is (in SOAPEnvelope#outputImpl()):
 - non-soapheader and non-soapbody stuff (included Text node)
 - soapheader
 - soapbody
 - trailers

This order is not same as DOM tree order. 
(Also it is not clear what the trailers are. I can't find examples which uses the trailers.)

The right serialization is to iterate the children and serialize each as it appears.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message