Skip to content

Commit

Permalink
[JAX-WS] The client out interceptor chain is not called in case of on…
Browse files Browse the repository at this point in the history
…eway operation (fix exchange and interceptor chain issues)
  • Loading branch information
reta committed Oct 28, 2023
1 parent 437f688 commit 4845f08
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,6 @@ protected void onewayOnly(Exchange exhange) {
}

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);
Expand Down Expand Up @@ -758,7 +757,7 @@ protected void onewayOnly(Exchange exhange) {
}
}

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)
Expand Down Expand Up @@ -1122,7 +1121,7 @@ protected void modifyOnewayChain(InterceptorChain chain, Message ctx) {
Collection<Interceptor<? extends Message>> is
= CastUtils.cast((Collection<?>)ctx.get(Message.IN_INTERCEPTORS));
if (is != null) {
chain.add(is);
chain.add(filterOneway(is));
}
}

Expand Down

0 comments on commit 4845f08

Please sign in to comment.