JAX-WS Handlers

As an alternative to the @HandlerChain annotation, JAX-WS Handlers can be added to both your client or server via application.properties:

# A web service endpoint with multiple Handler classes

# A web service client with a single Handler

Where MySOAPHandler could look like below:

import jakarta.xml.ws.handler.soap.SOAPHandler;
import jakarta.xml.ws.handler.soap.SOAPMessageContext;

public class MySOAPHandler implements SOAPHandler {

    public boolean handleMessage(SOAPMessageContext messageContext) {
        SOAPMessage msg = messageContext.getMessage();
        return true;
    // other methods
Class loading

The SOAPHandler classes are loaded via CDI first..

If no CDI beans are available, the constructor without parameters will be invoked to instantiate each class.