Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A85FD780 for ; Tue, 16 Oct 2012 04:25:04 +0000 (UTC) Received: (qmail 95044 invoked by uid 500); 16 Oct 2012 04:25:04 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 94651 invoked by uid 500); 16 Oct 2012 04:25:03 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 94603 invoked by uid 99); 16 Oct 2012 04:25:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2012 04:25:02 +0000 Date: Tue, 16 Oct 2012 04:25:02 +0000 (UTC) From: "Yi Xiao (JIRA)" To: issues@cxf.apache.org Message-ID: <859336528.49746.1350361502761.JavaMail.jiratomcat@arcas> In-Reply-To: <1166402024.45536.1350313563150.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CXF-4565) The message flow is not correct when handler throw ProtocolException outbound MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476719#comment-13476719 ] Yi Xiao commented on CXF-4565: ------------------------------ You are welcome. > The message flow is not correct when handler throw ProtocolException outbound > ----------------------------------------------------------------------------- > > Key: CXF-4565 > URL: https://issues.apache.org/jira/browse/CXF-4565 > Project: CXF > Issue Type: Bug > Components: JAX-WS Runtime > Reporter: Yi Xiao > Assignee: Freeman Fang > Labels: handler > Fix For: 2.4.11, 2.5.7, 2.6.4, 2.7.1 > > Attachments: cxf-4565.patch > > > The scenario is using two SoapHandler and one LogicalHandler to intercept the message from client, and when LogicalHandler at server side handle the outbound message, it throws a ProtocolException. > Now, the message flow at server side in CXF is: > Server_SOAPHandler1_handleMessage_Inbound: > Server_SOAPHandler2_handleMessage_Inbound: > Server_LogicalHandler_handleMessage_Inbound: > Server_countString: > Server_LogicalHandler_handleMessage_Outbound: > Server_LogicalHandler_handleFault_Outbound: // All of the three > Server_SOAPHandler2_handleFault_Outbound: // handlerFault methods > Server_SOAPHandler1_handleFault_Outbound: // are invoked > Server_LogicalHandler_close: > Server_SOAPHandler2_close: > Server_SOAPHandler1_close: > But according to jsr224 9.3.2.1 > Throw ProtocolException or a subclass This indicates that normal message processing should cease. > Subsequent actions depend on whether the MEP in use requires a response to the message currently being processed or not: > 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). > I also test the same case in WebSphere8.5 and Glassfish3.1.2.2, the message flow is: > Server_SOAPHandler1_handleMessage_Inbound: > Server_SOAPHandler2_handleMessage_Inbound: > Server_LogicalHandler_handleMessage_Inbound: > Server_countString: > Server_LogicalHandler_handleMessage_Outbound: > Server_LogicalHandler_close: > Server_SOAPHandler2_close: > Server_SOAPHandler1_close: > The handleFault methods are not called, and the close methods are called directly, I think it matches the spec better. > I also provide a patch for the issue. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira