Webservice returns exception: unable to find valid certification path to requested target

0
Hi all, We are trying to consume a webservice published by a SAP server. The connection has to be SSL enabled and therefore we need a security certificate. We've been trying a lot of things (both on SAP and Mendix sides), but we keep bumping into the error below. It occurs whenever I execute a microflow that tries to consume the webservice. This website explains - I think - quite well what should be done, but I am not sure how to achieve this. Does anyone have any experience with this/any idea on how to fix this? Thanks in advance! com.mendix.modules.microflowengine.MicroflowException: com.sun.xml.ws.client.ClientTransportException: HTTP transport error: 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 at Geodis.IVK_GetOrderStatus (CallWebservice : 'Call web service 'ZzAocSampleAndEvents'') Advanced stacktrace: at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:144) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.sun.xml.ws.client.ClientTransportException: HTTP transport error: 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 at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:36) Caused by: com.sun.xml.ws.client.ClientTransportException: HTTP transport error: 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 at com.sun.xml.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:132) at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:256) at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:184) at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:137) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:641) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:600) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482) at com.sun.xml.ws.client.Stub.process(Stub.java:323) at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:192) at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:218) at com.mendix.integration.webservices.call.WebserviceCaller$3.run(WebserviceCaller.java:306) at com.mendix.integration.webservices.call.WebserviceCaller$3.run(WebserviceCaller.java:284) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.integration.webservices.call.WebserviceCaller$1.execute(WebserviceCaller.java:251) at com.mendix.integration.webservices.call.WebserviceCaller$1.execute(WebserviceCaller.java:248) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.util.classloading.Runner$1.run(Runner.java:21) at java.security.AccessController.doPrivileged(Native Method) at com.mendix.util.classloading.Runner.runUsingClassLoaderOf(Runner.java:17) at com.mendix.integration.webservices.call.WebserviceCaller.call(WebserviceCaller.java:255) at com.mendix.integration.webservices.call.WebserviceCaller.call(WebserviceCaller.java:129) at com.mendix.integration.webservices.WebserviceModuleImpl.callWebservice(WebserviceModuleImpl.java:196) at com.mendix.integration.internal.InternalIntegrationImpl.callWebservice(InternalIntegrationImpl.scala:276) at com.mendix.integration.actions.microflow.CallWebServiceAction.execute(CallWebServiceAction.scala:73) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:44) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:192) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:149) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:49) at com.mendix.core.actionmanagement.CoreAction.doCall(CoreAction.java:261) at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:249) at com.mendix.core.actionmanagement.ActionManager$1.execute(ActionManager.java:192) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.actionmanagement.ActionManager.executeSync(ActionManager.java:198) at com.mendix.core.component.InternalCore.execute(InternalCore.java:229) at com.mendix.webui.actions.client.ExecuteAction.execute(ExecuteAction.java:135) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply$mcV$sp(ClientRequestHandler.scala:300) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.webui.requesthandling.ClientRequestHandler$$anonfun$handleRequest$1.apply(ClientRequestHandler.scala:293) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2$$anon$1.execute(ActionDispatching.scala:125) at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32) at com.mendix.core.session.Worker$$anonfun$receive$3$$anonfun$2.apply(ActionDispatching.scala:127) at scala.util.Try$.apply(Try.scala:191) at com.mendix.core.session.Worker$$anonfun$receive$3.applyOrElse(ActionDispatching.scala:121) at akka.actor.Actor$class.aroundReceive(Actor.scala:465) at com.mendix.core.session.Worker.aroundReceive(ActionDispatching.scala:117) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:516) at akka.actor.ActorCell.invoke(ActorCell.scala:487) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:238) at akka.dispatch.Mailbox.run(Mailbox.scala:220) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
asked
2 answers
0

I think you still need to elaborate a bit on what you did try exactly, and if you are in the standard cloud or not (which make a huge diference).

First step would be to make everything work with soapUI.

Second step would be to make it locally work. Use Wireshark to debug the problems.

Third step would be to configurate the Mendix environment and add the certificates in the standard cloud. Step three is harder to debug. Most of the time you would need to do the logging / debugging on the customer side.

Hope this helps a bit.

Regards,

Ronald

answered
0

Thanks for the post Ronald! I received some help from Mendix and now it works perfectly. He told me to redownload the certificate again by going to the base URL and downloading it manually. Before this I received the certificate by exporting it from SAP, which didn't work.

answered