[JAX-WS] @HandlerChain example with unit test

JAX-WS @WebService component use a handler chain to alter incoming and outgoing SOAP messages. SOAP Handlers are similar to Servlet Filters or EJB/CDI Interceptors.

1. Project Layout (you can create an example WebService project)

2. LogService interface (this is the interface for our web service)

3. The implementing class

4. Handlers.xml (in the same package)

5. One of the SOAPHandlers (Inflate)

6. The other SOAPHandler (Increment)


7. And the unit test


Leave a Reply

Your email address will not be published. Required fields are marked *