servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r991496 - in /servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr: NMRConduit.java NMRDestination.java NMRTransportFactory.java
Date Wed, 01 Sep 2010 10:21:52 GMT
Author: ffang
Date: Wed Sep  1 10:21:52 2010
New Revision: 991496

URL: http://svn.apache.org/viewvc?rev=991496&view=rev
Log:
[SMX4-585]incorrect MTOM message for NMR transport

Modified:
    servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduit.java
    servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestination.java
    servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRTransportFactory.java

Modified: servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduit.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduit.java?rev=991496&r1=991495&r2=991496&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduit.java
(original)
+++ servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRConduit.java
Wed Sep  1 10:21:52 2010
@@ -29,7 +29,6 @@ import org.apache.cxf.common.logging.Log
 import org.apache.cxf.message.Message;
 import org.apache.cxf.transport.AbstractConduit;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
-import org.apache.servicemix.nmr.api.Channel;
 import org.apache.servicemix.nmr.api.NMR;
 
 
@@ -64,8 +63,11 @@ public class NMRConduit extends Abstract
     
     public void prepare(Message message) throws IOException {
         getLogger().log(Level.FINE, "JBIConduit send message");
-                
+        NMRTransportFactory.removeUnusedInterceptprs(message);	
         message.setContent(OutputStream.class,
                            new NMRConduitOutputStream(message, nmr, target, this));
     }    
+    
+    
+
 }

Modified: servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestination.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestination.java?rev=991496&r1=991495&r2=991496&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestination.java
(original)
+++ servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRDestination.java
Wed Sep  1 10:21:52 2010
@@ -182,12 +182,15 @@ public class NMRDestination extends Abst
             // setup the message to be send back
             Channel dc = channel;
             message.put(Exchange.class, inMessage.get(Exchange.class));
+            NMRTransportFactory.removeUnusedInterceptprs(message);	
             message.setContent(OutputStream.class, new NMRDestinationOutputStream(inMessage,
message, dc));
+            
         }        
 
         protected Logger getLogger() {
             return LOG;
         }
+        
     }
     
 }

Modified: servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRTransportFactory.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRTransportFactory.java?rev=991496&r1=991495&r2=991496&view=diff
==============================================================================
--- servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRTransportFactory.java
(original)
+++ servicemix/smx4/features/trunk/cxf/cxf-transport-nmr/src/main/java/org/apache/servicemix/cxf/transport/nmr/NMRTransportFactory.java
Wed Sep  1 10:21:52 2010
@@ -24,14 +24,14 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
-import java.util.logging.Logger;
 
 import javax.annotation.PostConstruct;
 import javax.annotation.Resource;
 
 import org.apache.cxf.Bus;
-import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.configuration.Configurer;
+import org.apache.cxf.interceptor.Interceptor;
+import org.apache.cxf.message.Message;
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.AbstractTransportFactory;
 import org.apache.cxf.transport.Conduit;
@@ -149,4 +149,15 @@ public class NMRTransportFactory extends
         destinationMap.remove(epName);
     }
     
+    public static void removeUnusedInterceptprs(Message message) {
+		if (message.getInterceptorChain() != null) {
+			for (Interceptor interceptor : message.getInterceptorChain()) {
+				if (interceptor.getClass().getName().equals(
+						"org.apache.cxf.interceptor.AttachmentOutInterceptor")) {
+					message.getInterceptorChain().remove(interceptor);
+				}
+			}
+		}
+    }
+    
 }



Mime
View raw message