开发者

What is the easiest way (and ws-stack) to implement stand alone client to consume web service with security?

开发者 https://www.devze.com 2023-03-29 06:03 出处:网络
I need to consume a webservice with ws-security using a stand alone java client, I can\'t use the metro stack as I need to change the wsdl to include 开发者_开发技巧policies, any idea on which stack t

I need to consume a webservice with ws-security using a stand alone java client, I can't use the metro stack as I need to change the wsdl to include 开发者_开发技巧policies, any idea on which stack to use ? I prefer to avoid scrap (stacks which I will need to spend a quarter trying to configure it)... for example, I downloaded jboss 6 to use its wsrunclient.bat, but it didn't work and I had Spring exception (WHAT IS THE RELATION BETWEEN JBOSS AND SPRING!!!!) they didn't bother testing that..


Are you talking about wsHttpBindings? I don't believe that java can consume a web service with anything but basicHttpBindings. But I may be wrong


I don't know what you mean by http bindings, I don't use http basic security.

I have thos code:

   ((StubExt) tmp).setConfigName("Standard WSSecurity Client");
            ((BindingProvider) tmp).getRequestContext().put(StubExt.PROPERTY_AUTH_TYPE, StubExt.PROPERTY_AUTH_TYPE_WSSE);
            ((BindingProvider) tmp).getRequestContext().put(BindingProvider.USERNAME_PROPERTY, "user");
            ((BindingProvider) tmp).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, "pwd");

which should tell the jboss stack to send security headers

0

精彩评论

暂无评论...
验证码 换一张
取 消