There is a section on that
defines how to handle plain text username/password.

1. Add WSS4JOutInterceptor to you CXF endpoint out interceptors with
following configuration options:
props.put(WSHandlerConstants.ACTION, WSHandlerConstants.USERNAME_TOKEN);
props.put(WSHandlerConstants.USER, username);
props.put(WSHandlerConstants.PASSWORD_TYPE, WSConstants.PW_TEXT);

2. Implement CallbackHandler interface to return password details
public class ClientPasswordCallback implements CallbackHandler {
    public void handle(Callback[] callbacks) throws IOException, 
        UnsupportedCallbackException {
        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
        // set the password for our message.

View this message in context:
Sent from the Camel - Users mailing list archive at

Reply via email to