Fatima Toumeh
Fatima Toumeh

Reputation: 11

why does using url cause problems in Mendix?

so i have this error in mendix when I am trying to use "get" to get the address information by inserting the post code and the house number to some API (the url is working alone but not working when i use it in Get in Mendix) enter image description here

Of course i am using variables but showing this as an example The error is: com.mendix.modules.microflowengine.MicroflowException: Error calling REST service at EPD.CityAutofill (CallRest : 'Call REST (GET)')

Advanced stacktrace: at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:65)

Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: java.security.PrivilegedActionException: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.mendix.integration.util.PrivilegedUtil$$anonfun$withPrivileged$2.applyOrElse(PrivilegedUtil.scala:17)

Caused by: java.security.PrivilegedActionException: null at java.base/java.security.AccessController.doPrivileged(Native Method) at com.mendix.integration.util.PrivilegedUtil$.$anonfun$withPrivileged$1(PrivilegedUtil.scala:13) at scala.util.Try$.apply(Try.scala:210) at com.mendix.integration.util.PrivilegedUtil$.withPrivileged(PrivilegedUtil.scala:13) at com.mendix.http.LoggableHttpClient.execute(LoggableHttpClient.scala:27) at com.mendix.integration.actions.microflow.RestCallAction.executeRequest(RestCallAction.scala:80) at com.mendix.integration.actions.microflow.RestCallAction.execute(RestCallAction.scala:60) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:32) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:29) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.$anonfun$executeAfterBreakingIfNecessary$2(MicroflowImpl.scala:172) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:172)

Upvotes: 1

Views: 907

Answers (1)

Jasper van der Hoek
Jasper van der Hoek

Reputation: 151

That error that you are posting is a simple certificate error. I've seen this most often at applications that use self-signed certificates.

Unlike Mendix other API dev tools like for example Postman don't validate certificates they just communicate with anything you present. Mendix does strict certificate validation to make sure that no one can disrupt(hack) your communication.

The solution is very simple, you just load the certificate into Mendix, in the project explorer, item project settings, there is a tab called certificates. If you upload the public key certificate it's the same as telling the platform to trust that certificate. If you haven't created or don't own the certificate you can easily download it, this is a simple explanation how: https://medium.com/@menakajain/export-download-ssl-certificate-from-server-site-url-bcfc41ea46a2 (just the simple DER option).

Upvotes: 4

Related Questions