ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AXIOM-430) Inconsistent serialization of SOAPEnvelope
Date Tue, 10 Jun 2014 17:25:03 GMT

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

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

SUCCESS: Integrated in ws-axiom-trunk #1813 (See [https://builds.apache.org/job/ws-axiom-trunk/1813/])
AXIOM-430:
* Don't skip serialization of empty SOAP Header elements.
* Add a createDefaultSOAPMessage method to SOAPFactory. (veithen: rev 1601687)
* /webservices/axiom/trunk/devguide/src/docbkx/devguide.xml
* /webservices/axiom/trunk/modules/axiom-api/src/main/java/org/apache/axiom/soap/SOAPFactory.java
* /webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPEnvelopeImpl.java
* /webservices/axiom/trunk/modules/axiom-dom/src/main/java/org/apache/axiom/soap/impl/dom/SOAPFactoryImpl.java
* /webservices/axiom/trunk/modules/axiom-dom/src/test/java/org/apache/axiom/soap/impl/dom/SOAPImplementationTest.java
* /webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPEnvelopeImpl.java
* /webservices/axiom/trunk/modules/axiom-impl/src/main/java/org/apache/axiom/soap/impl/llom/SOAPFactoryImpl.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/soap/SOAPTestSuiteBuilder.java
* /webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/envelope/TestGetSOAPBodyFirstElementLocalNameAndNSWithParser.java
* /webservices/axiom/trunk/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap/factory/TestCreateDefaultSOAPMessage.java
* /webservices/axiom/trunk/userguide/src/docbkx/userguide.xml


> 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:
> {code:java}
> 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));
> {code}
> The output is: 
> {code:xml}
> <?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>
> {code}
> In addition to that, SOAPEnvelopeImpl#internalSerialize also skips serialization of whitespace
and comments.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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


Mime
View raw message