Connecting to webservice from code

Hi,

I’m trying to retreive some data from a webservice in java by using an external task. The connection is secured by SSL. I’ve created code that sets up this connection and it works fine in unittests. But when I try to execute the same piece of code from a external task in Camunda, I get a javax.net.ssl.SSLHandshakeException, meaning the required certificate is not provided. I do add the certificates in my code like i do in my unittests:
System.setProperty(“javax.net.ssl.keyStoreType”, “JKS”);
System.setProperty(“javax.net.ssl.keyStore”, “/Users/myuser/files/keystore”);
System.setProperty(“javax.net.ssl.keyStorePassword”, “mypassword”);

Can anyone tell me what is going wrong?
Thanks!

Hi,
perhaps you need to import a certificate into the java certificate store. I suggest a google search for import jre certificate for some detailed reading…

regards

Rob

Thanks for you response, I tried this but it didnt have any effect.

Which application server do you use?

Im using Apache Tomcat 8

The problem I see is the setting of system properties beeing blocked or overridden by camunda. Does anyone have experience with this?

Camunda does not override system properties. I guess it is rather a Tomcat-specific configuration that you are missing, see for example https://stackoverflow.com/questions/9520987/tomcat-7-where-do-i-set-system-properties

Thanks Thorben! This was the problem.
For anyone encountering a simular problem: you can add system properties by editing the senenv.sh file in your tomcat folder

Thanks for sharing the solution.