Hello,
we are using ws security (UsernameTokenProfile) with our JBoss server. The Client is a multithreaded web application. For each web service call we have to add the logged in users credentials to the webservice so we can pass the authentication at the server. The client code looks like :
TestWebservice_Service service = new TestWebservice_Service(); TestWebservice port = service.getPort(TestWebservice.class); ((StubExt) port).setConfigName("Standard WSSecurity Client"); ((StubExt) port).setSecurityConfig("jboss-wsse-client.xml"); ((BindingProvider) port).getRequestContext().put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE); ((BindingProvider) port).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "user"); ((BindingProvider) port).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "pwd");