axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] [Issue Comment Edited] (AXIS2-5302) Enable streaming of the root part of a SwA/MTOM message
Date Sat, 28 Apr 2012 11:17:49 GMT

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

Andreas Veithen edited comment on AXIS2-5302 at 4/28/12 11:16 AM:
------------------------------------------------------------------

With AXIOM-416 implemented the patch would be as follows:

Index: modules/kernel/src/org/apache/axis2/builder/MIMEBuilder.java
===================================================================
--- modules/kernel/src/org/apache/axis2/builder/MIMEBuilder.java	(revision 1331561)
+++ modules/kernel/src/org/apache/axis2/builder/MIMEBuilder.java	(working copy)
@@ -71,7 +71,7 @@
                 type = startInfo;
             }
         }
-        return builder.processDocument(attachments.getRootPartInputStream(),
+        return builder.processDocument(attachments.getRootPartInputStream(false),
                 type, msgContext);
     }
 }


However, this causes an issue in JAX-WS. In fact, multiple test cases in jaxws-integration
are failing with the following exception:

java.lang.IllegalStateException: The content of the MIME part has already been consumed
        at org.apache.axiom.attachments.PartImpl.getContent(PartImpl.java:154)
        at org.apache.axiom.attachments.PartImpl.getDataSource(PartImpl.java:234)
        at org.apache.axiom.attachments.PartDataHandler.getDataSource(PartDataHandler.java:50)
        at org.apache.axis2.jaxws.message.attachments.AttachmentUtils.findCachedAttachment(AttachmentUtils.java:88)
        at org.apache.axis2.jaxws.message.impl.MessageImpl.setMessageContext(MessageImpl.java:723)
        at org.apache.axis2.jaxws.core.MessageContext.<init>(MessageContext.java:122)
        at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.doInvoke(AxisInvocationController.java:144)
                
      was (Author: veithen):
    With AXIOM-416 implemented the patch would be as follows:

Index: modules/kernel/src/org/apache/axis2/builder/MIMEBuilder.java
===================================================================
--- modules/kernel/src/org/apache/axis2/builder/MIMEBuilder.java	(revision 1331561)
+++ modules/kernel/src/org/apache/axis2/builder/MIMEBuilder.java	(working copy)
@@ -71,7 +71,7 @@
                 type = startInfo;
             }
         }
-        return builder.processDocument(attachments.getRootPartInputStream(),
+        return builder.processDocument(attachments.getRootPartInputStream(false),
                 type, msgContext);
     }
 }


However, this causes an issue in JAX-WS. In fact, multiple test cases in jaxws-integration
are failing with the following exception:

ava.lang.IllegalStateException: The content of the MIME part has already been consumed
        at org.apache.axiom.attachments.PartImpl.getContent(PartImpl.java:154)
        at org.apache.axiom.attachments.PartImpl.getDataSource(PartImpl.java:234)
        at org.apache.axiom.attachments.PartDataHandler.getDataSource(PartDataHandler.java:50)
        at org.apache.axis2.jaxws.message.attachments.AttachmentUtils.findCachedAttachment(AttachmentUtils.java:88)
        at org.apache.axis2.jaxws.message.impl.MessageImpl.setMessageContext(MessageImpl.java:723)
        at org.apache.axis2.jaxws.core.MessageContext.<init>(MessageContext.java:122)
        at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.doInvoke(AxisInvocationController.java:144)
                  
> Enable streaming of the root part of a SwA/MTOM message
> -------------------------------------------------------
>
>                 Key: AXIS2-5302
>                 URL: https://issues.apache.org/jira/browse/AXIS2-5302
>             Project: Axis2
>          Issue Type: Improvement
>          Components: kernel
>    Affects Versions: 1.6.2
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>
> The Axiom API that Axis2 is currently using to process a SwA or MTOM message will always
load the root part of the MIME message into memory, although Axiom 1.2.13 introduced a feature
to avoid that. The Axis2 code (MIMEBuilder) needs to be changed to take advantage of that
new feature.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message