1 Reply Latest reply on Aug 4, 2008 10:34 PM by mandaloju2

    Client for SSL WebService

    aiko85

      Hi!

      I'm trying to connect to SSL-secured webservice; my client code looks like this:

      System.setProperty("javax.net.ssl.trustStore", trustStoreLocation);
      System.setProperty("javax.net.ssl.trustStorePassword", trustStorePass);
      this.service = Service.create(new URL(wsdl), new QName(nameSpace, serviceName));

      Now, this works fine when I run it as a stand-alone application and I'm able to use the webservice without problems...
      but when I use it as a part of application deployed on Jboss I get:


      sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
      at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
      at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
      at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
      at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
      at sun.security.validator.Validator.validate(Validator.java:203)
      at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
      at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
      ...

      Can anyone help me with this :(?

      Regards,
      Anne