Found the solution:
You must put the following line before you invoke the call:

System.setProperty("axis.socketSecureFactory", "org.apache.axis.components.net.SunFakeTrustSocketFactory");

Paul

Hi there,
I am trying to connect to an endpoint which is https and I get the
following error:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Could not find trusted certificate
faultActor:
faultNode:
faultDetail:

To try to resolve this I wrote a bogus TrustManager:

SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, AxisTrustManager.getAxisTrustManager(), new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());

The thing is I don't really know where I should be putting this snippet of code. At the moment, it is
in the soap stub where I invoke the webservice, but it doesn't work.

If anybody has already sorted this out, would they mind telling me where I should use this code?

Thanks in advance,

Paul



Reply via email to