SSL Webservice call

5
We are trying to call an imported webservice exposed through a https URI. If we call the test version of the same webservice on a non https URI all is well, but the production version through SSL raises the following exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of the trust anchors at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:975) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:123) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623) How should we configure the app to enable calling the webservice through SSL?
asked
2 answers
3

It appears that the server running your Mendix application does not trust the certificate of the web service. This could happen when the certificate is self-signed instead of issued by a trusted certificate authority.

You can add the certificate to your project in the Certificates tab of the Project Settings (version 2.5.2 and above). See the Project Settings documentation for more information.

answered
2

In java, you need to register certificates you want to trust, see the official documentation

and

https://forum.mendix.com/questions/1565/Mendix-configuration--PostgreSQL-database-SSL

answered