You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2013/01/22 03:52:13 UTC

[jira] [Commented] (AXIOM-430) Inconsistent serialization of SOAPEnvelope

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

Hudson commented on AXIOM-430:
------------------------------

Integrated in ws-axiom-trunk #1389 (See [https://builds.apache.org/job/ws-axiom-trunk/1389/])
    Prepared test cases for AXIOM-430. (Revision 1436683)

     Result = SUCCESS
veithen : 
Files : 
* /webservices/axiom/trunk/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java
* /webservices/axiom/trunk/modules/axiom-impl/src/test/java/org/apache/axiom/soap/impl/llom/SOAPImplementationTest.java
* /webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/OMTestSuiteBuilder.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/builder/MessageTest.java
* /webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/strategy/Strategies.java

                
> Inconsistent serialization of SOAPEnvelope
> ------------------------------------------
>
>                 Key: AXIOM-430
>                 URL: https://issues.apache.org/jira/browse/AXIOM-430
>             Project: Axiom
>          Issue Type: Bug
>          Components: DOOM, LLOM
>    Affects Versions: 1.2.13
>            Reporter: Andreas Veithen
>            Priority: Minor
>
> The SOAPEnvelopeImpl#internalSerialize method contains code that skips the serialization of the SOAP header if it is empty. Presumably this code is there because SOAPFactory#getDefaultEnvelope() always creates a SOAP header, but one doesn't want that header to appear in the output if there are no header blocks. However, this only works when the SOAPEnvelope is serialized to an XMLStreamWriter, OutputStream or Writer. The header is still present in the sequence of events produced by getXMLStreamReader or getSAXSource. This can be shown using the following piece of code:
>         SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
>         SOAPEnvelope envelope = factory.getDefaultEnvelope();
>         factory.createOMElement(new QName("urn:test", "test", "p"), envelope.getBody());
>         envelope.serialize(System.out);
>         System.out.println();
>         TransformerFactory.newInstance().newTransformer().transform(envelope.getSAXSource(true), new StreamResult(System.out));
> The output is: 
> <?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><p:test xmlns:p="urn:test"/></soapenv:Body></soapenv:Envelope>
> <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><p:test xmlns:p="urn:test"/></soapenv:Body></soapenv:Envelope>
> In addition to that, SOAPEnvelopeImpl#internalSerialize also skips serialization of whitespace and comments.

--
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