I already does what you say as follow, but it mean one instance of the
client per user connected.


I've search quite some time dans didn't find a way to set something like
the password callback handler.



 JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();

    factory.setServiceClass(WorkListService.class);

    factory.setAddress(this.endpoint);

    //
factory.setWsdlLocation("D:/ARTIC/SOURCE/artic/trunk/webapp/src/main/webapp/WSDL/brm.wsdl");

    factory.setServiceName(new QName("http://services.brm.n2.tibco.com";,
"WorkListService"));

    WorkListService workListService = (WorkListService) factory.create();


       Client client = ClientProxy.getClient(workListService);


    Map<String, Object> properties = new HashMap<String, Object>();

    properties.put(WSHandlerConstants.ACTION          , WSHandlerConstants.
USERNAME_TOKEN);

    properties.put(WSHandlerConstants.USER            , this.username);

    properties.put(WSHandlerConstants.PASSWORD_TYPE   , WSConstants.PW_TEXT
);// "PasswordDigest"

    properties.put(WSHandlerConstants.PW_CALLBACK_REF ,
newPasswordCallbackHandler(
this.username, password, "password"));


    client.getOutInterceptors().add(new WSS4JOutInterceptor(properties));


On Fri, Jul 12, 2013 at 4:36 PM, Colm O hEigeartaigh <[email protected]>wrote:

> ou could create a CXF interceptor that sets the username on the fly,
> before the WSS4JOutInterceptor is called.

Reply via email to