- 17.9K All Categories
- 3.3K Industry Applications
- 3.3K Intelligent Advisor
- 60 Insurance
- 534.4K On-Premises Infrastructure
- 137.7K Analytics Software
- 38.5K Application Development Software
- 5.3K Cloud Platform
- 109.1K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 70.8K Infrastructure Software
- 105.1K Integration
- 41.5K Security Software
Calling Restful service from BPM 18.104.22.168
Hi , My project is running on BPM 22.214.171.124 version. We have a requirement to call Restful service from BPM. We created a java client and calling Restful service. We followed the below two approaches , still it is not working.
1. Calling Restful from java using the below code snippet. When I run this class directly from linux server , then it is working fine. If i deploy this class in weblogic and run it , then i am getting SSL Handshake error. We found that restful service has TLS with SNI enablement. Will weblogic support SNI or no ? We imported all the certs required . JDK version is jdk126.96.36.199
URL url = new URL(restful url);
URLConnection urlConnection = url.openConnection();
urlConnection.setRequestProperty("Authorization", "Basic " + authStringEnc);
InputStream is = urlConnection.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
2. As the above approach is not working , then we created a shell script with Restfull service is called Curl command. And calling this shell script from java client. If i run this java client directly from linux , it is invoking shell and curl is getting executed successfully. But when we deploy this java client on weblogic and call shell script , all statements in shell are executing except curl command.
how can we get curl executed when we call from java ?
3. Using Jersey Client : Then we tried calling using Jersey Client approach using below code snippet. This is also throwing SSL Handshake error from weblogic , but working when ran it from linux server.
Client restClient = Client.create();
WebResource webResource = restClient.resource(url);
ClientResponse resp = webResource.accept("application/json").header("Authorization", "Basic " + authStringEnc).get(ClientResponse.class);
Please provide solution how to get rid off SSL handshake error or calling Curl from java client ?