camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriyC300 <>
Subject Re: CxfEndpoint soap client usernametoken authentication
Date Wed, 12 Oct 2016 18:24:29 GMT
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

View raw message