LibraryLink ToToggle FramesPrintFeedback

Implementing a Logical Handler

Logical handlers implement the javax.xml.ws.handler.LogicalHandler interface. The LogicalHandler interface, shown in Example 21.1 passes a LogicalMessageContext object to the handleMessage() method and the handleFault() method. The context object provides access to the body of the message and to any properties set into the message exchange's context.


To implement a logical hander you do the following:

  1. Implement any initialization logic required by the handler.

  2. Implement the message handling logic.

  3. Implement the fault handling logic.

  4. Implement the logic for closing the handler when it is finished.

  5. Implement any logic for cleaning up the handler's resources before it is destroyed.