-1

From my Spring Boot application, I wanted to call Red Hat Decision Manager kie server rest API:

String serverUrl = "https://server:host/services/rest/server";
String username = "username";
String password = "password";

But I am getting this error:

java.lang.RuntimeException: org.kie.server.common.rest.NoEndpointFoundException: No available endpoints found

It is because of certification error. I downloaded the certification from the site and created the Keystore. But, how can I call that https from our spring boot?

Kinkar
  • 9
  • 4
  • You can surely post the code which does the actual rest call, and you can provide more details about "created the keystore". Created it where? And how did you configure it? Or is your question that you don't know how to configure the truststore? – Gimby Oct 23 '19 at 09:28
  • https://github.com/zuned/zuni/wiki/Spring-RestClient-For-Https---How-to-handle-apache-SSL-Certificate – Shailesh Chandra Oct 23 '19 at 09:51
  • the error doesn't appear to be certificate error, can you try using curl command it you can access your serverUrl – Shailesh Chandra Oct 23 '19 at 09:53
  • @Gimby, I was following [link](https://access.redhat.com/documentation/en-us/red_hat_decision_manager/7.2/html-single/interacting_with_red_hat_decision_manager_using_kie_apis/index) to connect to Decision manager. – Kinkar Oct 23 '19 at 11:06
  • @ShaileshChandra, I can access the above serverUrl, only I am not able to connect to it through code. I am following this [link](https://access.redhat.com/documentation/en-us/red_hat_decision_manager/7.2/html-single/interacting_with_red_hat_decision_manager_using_kie_apis/index). Here they mentioned HTTP, but in our environment, everything is https – Kinkar Oct 23 '19 at 11:08

1 Answers1

1

You can use rest template for calling the rest API from your application:

https://howtodoinjava.com/spring-boot2/resttemplate/spring-restful-client-resttemplate-example/