[jboss-user] [JBossWS] - Using Jbossws for username token secure communication outsid
BigHeartedTone
do-not-reply at jboss.com
Fri Oct 26 08:25:06 EDT 2007
Hi
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.
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040908#4040908
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067456#4067456
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) {
| e.printStackTrace();
| 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.
Tony
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099261#4099261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099261
More information about the jboss-user
mailing list