Author: veithen Date: Wed Mar 4 23:15:07 2009 New Revision: 750219 URL: http://svn.apache.org/viewvc?rev=750219&view=rev Log: Added a test case demonstrating the issue described in WSCOMMONS-446.
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java Modified: webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java?rev=750219&r1=750218&r2=750219&view=diff ============================================================================== --- webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java (original) +++ webservices/commons/trunk/modules/axiom/modules/axiom-tests/src/test/java/org/apache/axiom/om/impl/mtom/MTOMStAXSOAPModelBuilderTest.java Wed Mar 4 23:15:07 2009 @@ -168,6 +168,22 @@ checkSerialization(root2, true); } + /** + * Test reading a message containing XOP. + * Serialize the tree (with caching). + * Then ensure that the XOP is preserved when it is serialized again. + * @throws Exception + */ + // Test for unresolved issue WSCOMMONS-446 + public void _testCreateSerializeAndSerializeOptimized() throws Exception { + OMElement root = createTestMTOMMessage(); + + // Serialize the tree (with caching). + root.serialize(new ByteArrayOutputStream()); + + // Write out the source + checkSerialization(root, true); + } /** * Test reading a message containing XOP.