Edwin Tailor

Greenhorn
+ Follow
since Aug 09, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Edwin Tailor

I forgot to mention that there is no security related info defined in the WSDL file.

Thanks
9 years ago
Hi everyone,

I've been trying to search the web for solutions but I can't seem to get the security header <wsse:security> with the username and password to be included in the request (to a 3rd party WSDL). There's no security header defined in the WSDL and I want to avoid modifying the WSDL. I'm using JAX-WS and I've tried the following for the username and password:

HelloService service = new HelloService();
Hello proxy = (service.getHelloPort());
((BindingProvider)proxy).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "userfoo");
((BindingProvider)proxy).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "passbar");

This doesn't seem to do the trick. I've read that Rampart/Axis2 has the ability to add the header. Should I switch to Axis2 or is there another workaround?

Thanks in advance for your input.
9 years ago