cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP Java connection to OnPremise destination service is throwing error

sk_ramkumar
Participant

Hi Experts,

I am trying to connect On Premise ( SAGE Api system ) through my Java CAP application.

I am using DestinationAccessor to connect my destination,  I made successful connection to destination, but I couldn't read the content from API system. 

This is my code.

 

HttpDestination destination = DestinationAccessor.getDestination(destName).asHttp();
HttpClient client = HttpClientAccessor.getHttpClient(destConfiguration);
HttpGet request = new HttpGet(absoluteURI);
HttpResponse response = client.execute(request);
 
My absolute URI is "http://devsage:9999/portalapi/api/data/Orders" , the same url is working when I tried,
"curl -v -i "dest_name.dest/portalapi/api/data/Orders" and it is giving data.
 
client.execute is giving below error, in my BAS,
I/O exception (java.net.SocketException) caught when processing request to {}->http://connectivityproxy.internal.cf.ap10.hana.ondemand.com:20003->http://devsage:9999: Connection reset
 
This is my destination created in BTP.
Screenshot 2024-02-01 at 10.26.23 am.png
 
Thanks in advance,
Ramkumar
View Entire Topic
newtork
Advisor
Advisor
0 Kudos

Please check whether you actually have an SAP Cloud Connector configured in your CF account that's able to serve route http://devsage:9999