0 Replies Latest reply on Sep 18, 2005 7:21 PM by zarko.zivanovic

    Problems with setting SSL and Axis while accessing web servi

    zarko.zivanovic

      Maybe I put confusing subject but I couldn?t think better.

      I?m trying to access web service over SSL using Axis generated stubs, and my code resides in stateless EJB (JBoss-3.2.5). I?m getting following error:

      javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found.

      Here is snippet of my client code:

      System.setProperty("javax.net.ssl.trustStore", "C:/tmp/client.truststore");
      System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
      IExampleSOAPWebService eh = getEhSoapPort();
      response = eh.helloWorld("Test.");

      I tried this code in stand alone java application and it worked. This means that I imported server certificate in client.truststore correctly.

      1) Does anyone know why I?m getting error? Like that when running in EJB container it is not enough to set javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword properties.

      2) Is there better way to configure SSL than to set these properties? By setting these properties I can make some other beans stop working correctly if they are using some other keystore?

      Best regards,
      Zarko