I am developing a Java desktop application and I want to consume a web service in it. The web service requires two-way SSL connection with message level security using binarysecuritytoken. I am using NetBeans IDE 6.9.1 with JDK 1.6.0.23 and JAX-WS as ws wrapper. How can I communicate with the ws without using any web server on client machine. Most of the stuff I read needs to have tomcat or some other web server on client machine (configuring the keystore in tomcat or so...). Is it possible to do? Please suggest some article for SSL based ws client for Java desktop application.

How to Sign the SOAPHeader using the BindingProvidor?? I want to add a signed SOAPHeader to the request/port generated by JAX-WS. There are extensions of BindingProvidor such as WSBindingProvider in jaxws-rt but it also uses J2EE container.
–
Tausif BaberJan 19 '11 at 10:50

When the webservice publish the WSDL, there will be security descriptors. You will then use wsimport to generate the client side artifact from the WSDL document then configure it appropriately. There is a simple tutorial (a bit dated but the concepts are all there) here (netbeans.org/kb/docs/websvc/wsit.html) using Netbeans.
–
Chuk LeeJan 19 '11 at 17:25

So there is no solution for the problem. I have to install either a web server(Tomcat) or an application server(Glassfish) on every client machine to run a small application. Even for custom SoapHeaders there is no built-in mechanism in J2SE and one has to use WSS4J, axis or metro (for example accessing BinarySecurityToken or SecurityTokenReference)
–
Tausif BaberJan 20 '11 at 13:08

You mentioned in your question that you want to consume webserivce in JavaSE. In JDK6, there is a wsimport tool which generates the artifact for a deployed service. If the deployed service has security descriptors in the wSDL, then wsimport will generate a corresponding set of handlers for you like BinarySecurityToken, etc.
–
Chuk LeeJan 21 '11 at 8:59