You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2023/10/28 00:46:58 UTC

(cxf) branch 3.6.x-fixes updated: [JAX-WS] The client out interceptor chain is not called in case of oneway operation (fix exchange and interceptor chain issues)

This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/3.6.x-fixes by this push:
     new 5cd30df44e [JAX-WS] The client out interceptor chain is not called in case of oneway operation (fix exchange and interceptor chain issues)
5cd30df44e is described below

commit 5cd30df44e67317dcaf6fbabdd0ffb0752fdf6a4
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Fri Oct 27 20:46:36 2023 -0400

    [JAX-WS] The client out interceptor chain is not called in case of oneway operation (fix exchange and interceptor chain issues)
---
 core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java b/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
index 2bee3982ae..2dea60e2ba 100644
--- a/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
+++ b/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
@@ -707,7 +707,6 @@ public class ClientImpl
         }
 
         final Message message = endpoint.getBinding().createMessage(original);
-        message.getExchange().setInMessage(message);
         message.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
         message.put(Message.INBOUND_MESSAGE, Boolean.TRUE);
         PhaseManager pm = bus.getExtension(PhaseManager.class);
@@ -758,7 +757,7 @@ public class ClientImpl
         }
     }
     
-    private List<Interceptor<? extends Message>> filterOneway(List<Interceptor<? extends Message>> interceptors) {
+    private List<Interceptor<? extends Message>> filterOneway(Collection<Interceptor<? extends Message>> interceptors) {
         return interceptors
             .stream()
             .filter(OneWayInterceptor.class::isInstance)
@@ -1122,7 +1121,7 @@ public class ClientImpl
         Collection<Interceptor<? extends Message>> is
             = CastUtils.cast((Collection<?>)ctx.get(Message.IN_INTERCEPTORS));
         if (is != null) {
-            chain.add(is);
+            chain.add(filterOneway(is));
         }
     }