JAX-WS - SOAP Handlers
What is SOAP Handlers ? SOAP Handlers are interceptor to do additional processing of incoming and outgoing message at Client as well as Server level. For example, to check properties in handler, to audit req/response or to do any filtering. SOAP message contains three parts as below:- SOAP Header [Optional] SOAP Body Attachments [Optional] JAX-WS 2.0 defines 2 types of Handlers - Logical and Message Handler. Logical Handlers operates on message context properties and message payload only. Logical handlers are handlers that implements - javax.xml.ws.handler.LogicalHandler Message Handlers operates all parts of SOAP, i.e. SOAP Header, Body and attachments. it implements - javax.xml.ws.handler.soap.SOAPHandler There are three methods of handlers as follows:- handleMessage() - This method is called for both incoming and outgoing message for any additional processing handleFault() - This handles any fault generated by service implementation or exception generated f...