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

Leave a Reply

Your email address will not be published. Required fields are marked

Information about Data protection

This site uses Akismet to reduce spam. Learn how your comment data is processed.

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}