You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2009/03/04 08:40:52 UTC
svn commit: r749937 -
/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
Author: ffang
Date: Wed Mar 4 07:40:52 2009
New Revision: 749937
URL: http://svn.apache.org/viewvc?rev=749937&view=rev
Log:
[SMXCOMP-470]we need cache attachment earlier when use ws-addressing and mtom
Modified:
servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java?rev=749937&r1=749936&r2=749937&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiOperationInterceptor.java Wed Mar 4 07:40:52 2009
@@ -19,6 +19,7 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamReader;
+import org.apache.cxf.attachment.LazyAttachmentCollection;
import org.apache.cxf.binding.soap.model.SoapBindingInfo;
import org.apache.cxf.binding.soap.model.SoapBodyInfo;
import org.apache.cxf.endpoint.Endpoint;
@@ -44,6 +45,7 @@
}
public void handleMessage(Message message) {
+ loadAttachments(message);
if (isGET(message)) {
return;
}
@@ -93,6 +95,14 @@
}
}
+ private void loadAttachments(Message message) {
+ //get chance to cache the attachments
+ if (message.getAttachments() != null) {
+ LazyAttachmentCollection attachments = (LazyAttachmentCollection) message.getAttachments();
+ attachments.size();
+ }
+ }
+
protected DepthXMLStreamReader getXMLStreamReader(Message message) {
XMLStreamReader xr = message.getContent(XMLStreamReader.class);