Ignore Axis Client Certification Certification for WCF

I created an axial client for the WCF service (the client was generated by Eclipse using WSDL as input).

The client works great when using HTTP.

When using HTTPS, I get the following exception:

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: Failed to create PKIX path: sun.security.provider.certpath.SunCertPathBuilderException: could not find a valid certification path for the requested target

I understand the error, but I do not want to tell her where the certificates are located.

I want to tell Axis to avoid this step (accept the certificate without checking it).

I know how to do this with HttpsURLConnection (create a custom validator that does nothing), but I don't know how to do this with an axis ... (How can I tell the axes to use my custom validator or better, how can I say to ignore this step altogether).

Can someone help me?

Thank,

Mattan

+5
source share
1 answer

I had the same problem and fixed it using:

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

If this does not work, look here .

+19
source

All Articles