"leandroal" wrote : 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.
|
|
OK, please post here the wsdl of the service you would like to call. It seems that the
endpoint you're hitting is not using the standard ws-security + username token.
It's using a custom soap header named the same way (but with different namespace,
yesterday I didn't noticed it, sorry).
If you can't change the service contract (using the standard security would of course
be better), you issue becomes "how do I set up a custom soap header?". Setting a
soap header should be quite straightforward, however it seems you have an issue with the
tools, since wsconsume is not correctly creating the parameter corresponding to the
header. Please post here the wsdl so that we can try to understand why.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4111121#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...