uCosminexus Application Server, Web Service Development Guide
This subsection describes the processing when the handleFault method returns true, returns false, and throws an exception.
When the handleFault method returns true, the JAX-WS engine processes the handler in the same direction as the currently running direction. If there are no more handlers, the messages are distributed.
The following figure shows the flow of response processing:
Figure 36-12 Processing when the handleFault method returns true (response)
When the handleFault method returns false, the JAX-WS engine retains the direction that is currently running, omits all the subsequent handlers and distributes the messages.
The following figure shows the flow when handler 2 returns false during response processing:
Figure 36-13 Processing when the handleFault method returns false (response)
When the handleFault method throws the ProtocolException or a sub-class, the JAX-WS engine retains the direction that is currently running, omits all the subsequent handlers, and throws an exception.
The following figure shows the flow when handler 2 throws the ProtocolException during response processing:
Figure 36-14 Processing when handleFault returns the ProtocolException (response)
In the Web Service, the JAX-WS engine converts the exception into a SOAP fault and replaces the originally stored SOAP fault. Therefore, the JAX-WS engine actually sends the newly generated fault message. For details about the fault message conversion, see 10.4.1(2) Runtime exception binding.
When the handleFault method throws other runtime exceptions, the JAX-WS engine retains the direction that is currently running, omits all the subsequent handlers, and distributes the messages.
The following figure shows the flow when handler 2 throws the RuntimeException during response processing:
Figure 36-15 Processing when handleFault returns the RuntimeException (response)
In the Web Service, the JAX-WS engine converts the exception into a SOAP fault and replaces the originally stored SOAP fault. Therefore, the JAX-WS engine actually sends the newly generated fault message. For details about the fault message conversion, see 10.4.1(2) Runtime exception binding.
In the Web Service client, the JAX-WS engine wraps the exception with javax.xml.ws.WebServiceException and throws WebServiceException.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.