...
- We assume that a SSL certifcate is imported in a Java truststore
/path/to/java/myTruststore.jks
- Please note that the REST client varify the hostname of the URL with the certificate
Code Block language xml collapse true <job stop_on_error="no" > <params/ > <script language="java:javascript"> <![CDATA[ function spooler_process() { //set location of the java truststore with ssl certificates java.lang.System.setProperty("javax.net.ssl.trustStore", "/path/to/java/truststore.jks"); //add an authorization if necessary com.sos.jitl.restclient.JobSchedulerRestClient.headers.put("Authorization","Basic cm9vdDpyOm9vdA=="); //request with https url var response = com.sos.jitl.restclient.JobSchedulerRestClient.executeRestServiceCommand("get", "https://..." ); spooler_log.info(response); return false; } ]]> </script> <run_time /> </job>
...