You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by an...@apache.org on 2006/11/14 10:16:48 UTC

svn commit: r474708 - in /incubator/cxf/trunk: pom.xml rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java rt/core/src/test/java/org/apache/cxf/interceptor/OutgoingChainInterceptorTest.java

Author: andreasmyth
Date: Tue Nov 14 01:16:47 2006
New Revision: 474708

URL: http://svn.apache.org/viewvc?view=rev&rev=474708
Log:
Prevent outbound interceptor chain from being executed for one way messages after the partial response has been sent by basing this decision on service model info rather than the presence of an out message in the exchange.
Re-enabled MAPTest.

Modified:
    incubator/cxf/trunk/pom.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
    incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/OutgoingChainInterceptorTest.java

Modified: incubator/cxf/trunk/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/pom.xml?view=diff&rev=474708&r1=474707&r2=474708
==============================================================================
--- incubator/cxf/trunk/pom.xml (original)
+++ incubator/cxf/trunk/pom.xml Tue Nov 14 01:16:47 2006
@@ -320,7 +320,9 @@
                         <!-- do not exclude **/Abstract*Test.java **/Abstract*TestCase.java -->
                         <excludes>
                             <exclude>**/*$*</exclude>
+                            <!--
                             <exclude>**/systest/**/SequenceTest.java</exclude>
+                            -->
                             <exclude>**/systest/**/MAPTest.java</exclude>
                         </excludes>
                         <reportFormat>${surefire.format}</reportFormat>

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java?view=diff&rev=474708&r1=474707&r2=474708
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java Tue Nov 14 01:16:47 2006
@@ -40,11 +40,13 @@
 
     public void handleMessage(Message message) {
         Exchange ex = message.getExchange();
+        BindingOperationInfo bin = ex.get(BindingOperationInfo.class);
+        if (null != bin && null != bin.getOperationInfo() && bin.getOperationInfo().isOneWay()) {
+            return;
+        }
         Message out = ex.getOutMessage();
-        
         if (out != null) {
             getBackChannelConduit(ex);
-            BindingOperationInfo bin = ex.get(BindingOperationInfo.class);
             if (bin != null) {
                 out.put(MessageInfo.class, bin.getOperationInfo().getOutput());
                 out.put(BindingMessageInfo.class, bin.getOutput());

Modified: incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/OutgoingChainInterceptorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/OutgoingChainInterceptorTest.java?view=diff&rev=474708&r1=474707&r2=474708
==============================================================================
--- incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/OutgoingChainInterceptorTest.java (original)
+++ incubator/cxf/trunk/rt/core/src/test/java/org/apache/cxf/interceptor/OutgoingChainInterceptorTest.java Tue Nov 14 01:16:47 2006
@@ -83,8 +83,9 @@
         opInfo = control.createMock(OperationInfo.class);
         mInfo = control.createMock(MessageInfo.class);
         bmInfo = control.createMock(BindingMessageInfo.class);
-        EasyMock.expect(bopInfo.getOperationInfo()).andReturn(opInfo);
+        EasyMock.expect(bopInfo.getOperationInfo()).andReturn(opInfo).times(3);
         EasyMock.expect(opInfo.getOutput()).andReturn(mInfo);
+        EasyMock.expect(opInfo.isOneWay()).andReturn(false);
         EasyMock.expect(bopInfo.getOutput()).andReturn(bmInfo);
 
         control.replay();