- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 67 Insurance
- 536.8K On-Premises Infrastructure
- 138.5K Analytics Software
- 38.6K Application Development Software
- 5.9K Cloud Platform
- 109.5K Database Software
- 17.6K Enterprise Manager
- 8.8K Hardware
- 71.2K Infrastructure Software
- 105.3K Integration
- 41.6K Security Software
Calling Restful service from BPM 126.96.36.199
Hi , My project is running on BPM 188.8.131.52 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 jdk184.108.40.206
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 ?