[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlrpc-user
Subject:    [jira] [Commented] (AXIOM-392) Inconsistent behavior with respect to order of SOAPFault child elemen
From:       "Hudson (JIRA)" <jira () apache ! org>
Date:       2013-01-26 19:35:16
Message-ID: JIRA.12527097.1318539714260.196568.1359228916574 () arcas
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/AXIOM-392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13563595#comment-13563595 \
] 

Hudson commented on AXIOM-392:
------------------------------

Integrated in ws-axiom-trunk #1401 (See \
[https://builds.apache.org/job/ws-axiom-trunk/1401/])  Corrected a problem with the \
initial fix for AXIOM-392. (Revision 1438929)

     Result = SUCCESS
veithen : 
Files : 
* /webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/OMElementHelper.java
                
* /webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/SOAPTestSuiteBuilder.java
                
* /webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/factory/SOAPFaultChild.java
                
* /webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/fault/TestChildOrder.java


                
> Inconsistent behavior with respect to order of SOAPFault child elements
> -----------------------------------------------------------------------
> 
> Key: AXIOM-392
> URL: https://issues.apache.org/jira/browse/AXIOM-392
> Project: Axiom
> Issue Type: Bug
> Components: DOOM, LLOM
> Affects Versions: 1.2.12
> Reporter: Andreas Veithen
> Assignee: Andreas Veithen
> Priority: Minor
> Fix For: 1.2.15
> 
> 
> SOAPFaultImpl#internalSerialize contains logic to reorder the child elements to \
> satisfy the requirements of SOAP 1.2 (which explicitly requires the child elements \
> of a SOAP fault to appear in a specific order). This is useful for programmatically \
> created SOAP faults because the application code doesn't need to take care of the \
> order in which setCode, setReason, etc. are called. However, the reordering only \
> works with some serialization methods. In particular, the child elements are not \
> reordered when the SOAP message is serialized using a pull parser. This can be \
> shown using the following code: SOAPFactory factory = \
> OMAbstractFactory.getSOAP12Factory(); SOAPFault fault = factory.createSOAPFault();
> SOAPFaultReason reason = factory.createSOAPFaultReason();
> reason.setText("Some reason");
> fault.setReason(reason);
> SOAPFaultCode code = factory.createSOAPFaultCode();
> code.setText(new QName(factory.getNamespace().getNamespaceURI(), "Server"));
> fault.setCode(code);
> System.out.println("Using serialize:");
> fault.serialize(System.out);
> System.out.println();
> System.out.println("Using pull parser:");
> XMLStreamWriter writer = StAXUtils.createXMLStreamWriter(System.out);
> new StreamingOMSerializer().serialize(fault.getXMLStreamReader(), writer);
> writer.close();
> The output is:
> Using serialize:
> <soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Code>soapenv:Server</soapenv:Code><soapenv:Reason>Some \
> reason</soapenv:Reason></soapenv:Fault> Using pull parser:
> <soapenv:Fault xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Reason>Some \
> reason</soapenv:Reason><soapenv:Code>soapenv:Server</soapenv:Code></soapenv:Fault> \
> The reordering only occurs in the first case. Ideally, Axiom should take care of \
> the order of child elements in the setCode, setReason, etc. methods and then just \
> serialize the object model as is.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic