[ https://issues.apache.org/jira/browse/CXF-4565?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Freeman Fang resolved CXF-4565. ------------------------------- Resolution: Fixed Fix Version/s: 2.7.1 2.6.4 2.5.7 2.4.11 apply patch on behalf of Yi Xiao with thanks http://svn.apache.org/viewvc?rev=1398629&view=rev for trunk http://svn.apache.org/viewvc?rev=1398632&view=rev for 2.6.x branch http://svn.apache.org/viewvc?rev=1398633&view=rev for 2.5.x branch http://svn.apache.org/viewvc?rev=1398636&view=rev for 2.4.x branch > 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