ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1161670 - in /webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts: SOAPTestSuiteBuilder.java soap12/envelope/TestMTOMForwardStreaming.java
Date Thu, 25 Aug 2011 17:55:57 GMT
Author: veithen
Date: Thu Aug 25 17:55:57 2011
New Revision: 1161670

URL: http://svn.apache.org/viewvc?rev=1161670&view=rev
Log:
AXIOM-377: Take into account that the code path executed by serializeAndConsume is significantly
different if the element is complete. We need to support MIME part streaming in both cases
(complete/incomplete).

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
    webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java?rev=1161670&r1=1161669&r2=1161670&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/SOAPTestSuiteBuilder.java
Thu Aug 25 17:55:57 2011
@@ -106,7 +106,8 @@ public class SOAPTestSuiteBuilder extend
         addTest(new org.apache.axiom.ts.soap11.header.TestGetHeadersToProcessWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.envelope.TestAddElementAfterBody(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.envelope.TestBuildWithAttachments(metaFactory));
-//        addTest(new org.apache.axiom.ts.soap12.envelope.TestMTOMForwardStreaming(metaFactory));
+//        addTest(new org.apache.axiom.ts.soap12.envelope.TestMTOMForwardStreaming(metaFactory,
true));
+//        addTest(new org.apache.axiom.ts.soap12.envelope.TestMTOMForwardStreaming(metaFactory,
false));
         addTest(new org.apache.axiom.ts.soap12.fault.TestGetNode(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.fault.TestGetNodeWithParser(metaFactory));
         addTest(new org.apache.axiom.ts.soap12.fault.TestMoreChildrenAddition(metaFactory));

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java?rev=1161670&r1=1161669&r2=1161670&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
(original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
Thu Aug 25 17:55:57 2011
@@ -48,8 +48,12 @@ import org.apache.axiom.ts.AxiomTestCase
  * messages very efficiently.
  */
 public class TestMTOMForwardStreaming extends AxiomTestCase {
-    public TestMTOMForwardStreaming(OMMetaFactory metaFactory) {
+    private final boolean buildSOAPPart;
+    
+    public TestMTOMForwardStreaming(OMMetaFactory metaFactory, boolean buildSOAPPart) {
         super(metaFactory);
+        addTestProperty("buildSOAPPart", String.valueOf(buildSOAPPart));
+        this.buildSOAPPart = buildSOAPPart;
     }
 
     protected void runTest() throws Throwable {
@@ -102,6 +106,11 @@ public class TestMTOMForwardStreaming ex
                         SOAPEnvelope envelope = new MTOMStAXSOAPModelBuilder(
                                 StAXUtils.createXMLStreamReader(attachments.getSOAPPartInputStream()),
                                         attachments).getSOAPEnvelope();
+                        // The code path executed by serializeAndConsume is significantly
different if
+                        // the element is built. Therefore we need two different test executions.
+                        if (buildSOAPPart) {
+                            envelope.build();
+                        }
                         // Usage of serializeAndConsume should enable streaming
                         envelope.serializeAndConsume(pipe2Out, format);
                     } finally {



Mime
View raw message