Hi, Guys. I am having the same issues: I am trying to connect to secured webservice which needs login and password.
I am using JBoss Portal 2.6.3, JDK 1.6, jax-ws jars copied to lib/endorsed as described here: https://jira.jboss.org/jira/browse/JBWS-1439
I've tried this code as Bonny provided:
((StubExt)port).setConfigName("Standard WSSecurity Client");
((BindingProvider)port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "kermitabc");;
((BindingProvider)port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "thefrogdef");;
But I just getting back this exception again and again:
javax.xml.ws.soap.SOAPFaultException: Security requirements are not satisfied because the security header is not present in the incoming message.
I spent about a day readin all wiki pages about WS-Security at Jboss.org but I didn't find any other way to provide password from the client. Maybe somebody know where we can get some real working example?