You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ff...@apache.org on 2012/10/16 05:35:44 UTC
svn commit: r1398629 -
/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
Author: ffang
Date: Tue Oct 16 03:35:43 2012
New Revision: 1398629
URL: http://svn.apache.org/viewvc?rev=1398629&view=rev
Log:
[CXF-4565]per JAXWS spec 9.3.2.1, if outbound throw ProtocolException and No response is expected then the message processing stops and the handlerFault method of handlers shouldn't get invoked
Modified:
cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java?rev=1398629&r1=1398628&r2=1398629&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java (original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/HandlerChainInvoker.java Tue Oct 16 03:35:43 2012
@@ -278,8 +278,16 @@ public class HandlerChainInvoker {
//The fault is raised from previous handlers, in this case, we only invoke handleFault
//if the fault is a ProtocolException
- if (fault != null && !(fault instanceof ProtocolException)) {
- return true;
+ if (fault != null) {
+ if (!(fault instanceof ProtocolException)) {
+ return true;
+ } else if (!responseExpected && !messageDirectionReversed) {
+ // According to jsr224 9.3.2.1,
+ // If throw ProtocolException or a subclass:
+ // No response, normal message processing stops, close is called on each previously invoked handler
+ // in the chain, the exception is dispatched (see section 9.1.2.3).
+ return true;
+ }
}
if (LOG.isLoggable(Level.FINE)) {