2 Replies Latest reply on Oct 30, 2007 9:21 AM by Alessio Soldano

    Using Jbossws for username token secure communication outsid

    Tony Wardell Newbie

      Can anybody help me? I have been unable to find anything that points me in the right direction those these two posts are the closest.



      I am trying to communicate with a webservice that use username token based security, using the jbossws implementation. I am doing this outside of the container for a test. Reading these forums, it looks like I should be doing the following once I got the username token (which I can do fine)

       BlahService service = new BlahService (); //Generated Service class using wsconsume
       BlahServicePortType psp = service.getBlahServiceHttpPort();
       ((StubExt) psp).setConfigName("Standard WSSecurity Client");
       Map<String, Object> reqContext = ((BindingProvider)psp).getRequestContext();
       reqContext.put(Stub.USERNAME_PROPERTY, loginService.getToken());
       try {
       ArrayOfModelSummary summary = psp.listAvailableModels();
       return summary.getModelSummary();
       } catch (BlahWSFault e) {
       throw new BlahException(e);

      I am using the jbossws 2.0.1 implementation. Should I be doing it this way? What classes do I use to get the key value into the context. Any help gratefully recieved.