Hi Colm,

While setting up a testcase for you I worked out what my problem was.

As well as creating a validator to validate the password using:


                    Map<String, Object> serviceProperties = new
HashMap<String, Object>(); 
                    serviceProperties.put("ws-security.ut.no-callbacks",
"true");
                   
serviceProperties.put("ws-security.enable.nonce.cache",false); 
                   
serviceProperties.put("ws-security.enable.timestamp.cache", false);
                   
serviceProperties.put(SecurityConstants.USERNAME_TOKEN_VALIDATOR, new
UTValidator(authenticationService)); 
                    
                    factory.setProperties(serviceProperties);

I also had 
                    Map<String, Object> inProps = new HashMap<String,
Object>();
                    inProps.put(WSHandlerConstants.ACTION,
WSHandlerConstants.USERNAME_TOKEN);
                    inProps.put(WSHandlerConstants.PASSWORD_TYPE,
WSConstants.PW_TEXT);
                    WSS4JInInterceptor wssIn = new
WSS4JInInterceptor(inProps); //for WS-Security support
                    
                    cxfEndpoint.getInInterceptors().add(wssIn);

I think it was failing in the unnecessary WSS4JInInterceptor code. Once I
had removed that everything worked great.

Thanks for your help.

Simon.



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Plain-text-password-ws-policy-tp5726729p5726811.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to