[jboss-user] [JBossWS] - Re: UsernameToken authentication using JBossWS

leandroal do-not-reply at jboss.com
Thu Dec 6 23:22:24 EST 2007


Do you say something like this:

        Map<String, Object> requestContext = ((BindingProvider)serviceSoap).getRequestContext();
        requestContext.put(BindingProvider.USERNAME_PROPERTY, "OULU");
        requestContext.put(BindingProvider.PASSWORD_PROPERTY, "810420_A");

If yes, I did and it doesn't work.

When I run wsconsumer against the wsdl, it generated the UsernameToken java class and I can instantiate it:

        UsernameToken usernameToken = new UsernameToken();
        usernameToken.setUsername("xxx");
        usernameToken.setPassword("yyyy");

But how to add this object into the SOAP Header?

Thanks,
Leandro.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111083#4111083

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4111083



More information about the jboss-user mailing list