I created an axis client to WCF service (the client was generated by Eclipse, using the WSDL as an input).
The client works fine when using HTTP.
When using HTTPS I'm getting the following exception:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I understand the error, but I don't want to give it a place where the certificates are located.
I want to tell Axis to avoid this step (accept any certificate without checking it).
I know how to do it with HttpsURLConnection (create a custom validator which does nothing), but I don't know how to do it with axis... (How can I tell axis to use my custom validator, or better, how can I tell it to ignore this step at all).
Can someone help me?
Thanks,
Mattan
I had the same problem and fixed it using:
AxisProperties.setProperty("axis.socketSecureFactory","org.apache.axis.components.net.SunFakeTrustSocketFactory");
In case this doesn't work, have a look here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With