With Java it is easy to consume a Web Service over HTTPS but how do you publish one?
The standard JAX-WS implementation doesn’t support it. We tried Jetty but Jetty does not have support for Web Services over HTTPS either (JettyHttpServerProvider‘s createHttpsServer() throws an UnsupportedOperatonException). I think this problem should be really easy. But somehow I always run against walls.
Additionally this has to work with OSGi so I’d prefer if most or all dependencies are available as bundles. Currently I try to get CXF running but it has a lot of non-OSGi dependencies which makes deployment very hard.
We also need client authentication via certificates but my hope is this will be relatively easy once HTTPS is enabled.
Why is this such a big deal? For example to provide static content with Jetty, all you need to do is create a server, add any SSL connector and you’re done. Why can’t it be that easy for Web Services?
Our system uses cxf and jetty in OSGi, and it works fine with HTTPS.
When you publish your service to WebService, you should not concern it is HTTP or HTTPS. Configure your jetty to support HTTPS by passing the following properties to OSGi:
You can check out the other properties in
By doing this, you can try to use IE to access the wsdl of your service through https.