December 31, 2013

JaxWS with self signed certificates

0  comments

Self signed certificates are common, especially on testservers. The java default solution to add the certificate to every developers and buildservers java vm is a pain in the ass. For the play WS api there is an easy workaround. To use soap webservices with JaxWS and self signed certificates I found SSLUtilities.java on Srđan Šrepflers Blog. To use it you have add the following static calls to the class with the webservice call:
    static {
        SSLUtilities.trustAllHostnames();
        SSLUtilities.trustAllHttpsCertificates();
    }

Tags

Java, JaxWS, soap, ssl, SSLEngine problem, SSLHandshakeException, webservice


You may also like

Blog url changed to https

I just changed the url of this blog to https://jensjaeger.com. TLS encryption is now the default for all request to this page. It might be possible that some image links on some articles are hard coded http. If you find such an error it would be nice if you leave me comment so i can

Read More

Format date and time in java with prettytime

Prettytime is a nice java library to format a java Date()s in a nice humanized ago format, like: moments ago 2 minutes ago 13 hours ago 7 months ago 2 years ago Prettytime is localized in over 30 languages. It’s super simple to use Add the dependency to your maven pom: org.ocpsoft.prettytime prettytime 3.2.7.Final or

Read More