-
Bug
-
Resolution: Done
-
Major
-
None
-
None
In order to make addressing work properly it's necessary to throw
RuntimeExceptions instead of ProtocolExceptions in addressing handler.
This is because if exception is thrown in inbound part of the addressing
handler then handleFault isn't called at all on this addressing handler.
JAX-WS specification defines different behaviour for protocol exceptions
and for runtime exceptions thrown in handlers. Here's the copy/paste from the specification:
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:
Response Normal message processing stops, fault message processing starts. The message direction
is reversed, if the message is not already a fault message then it is replaced with a fault message4 ,
and the runtime invokes handleFault on the next4 handler or dispatches the message (see
section 9.1.2.2) if there are no further handlers.
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).
Throw any other runtime exception This indicates that normal message processing should cease. Subse-
quent actions depend on whether the MEP in use includes a response to the message currently being
processed or not:
Response Normal message processing stops, close is called on each previously invoked handler in
the chain, the message direction is reversed, and the exception is dispatched (see section 9.1.2.3).
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).