Skip to Content
author's profile photo Former Member
Former Member

HANA XSJS web service call(cloud foundry service) error

Hi Colleagues,

This issue may seem generic, (checked a lot of scn's similar questions and post) but to no avail!

I am basically calling a web service to fetch some data hosted on cloud foundry's hana instance from my xs package(hcptrial account) but I keep getting this error

HttpClient.request: request failed: internal error occurred "Failed to send request to socket...rc = -1"

The spring.xshttpdest file is

host = "";
port = 80;
proxyType = http;
proxyHost = "proxy-trial";
proxyPort = 8080;
authType = none;
useSSL = true;
timeout = 30000;

spring.xsjs file

var destination_package = "spring";
var destination_name = "spring";

try {
       var dest = $.net.http.readDestination(destination_package, destination_name);
       var client = new $.net.http.Client();
       var req = new $.web.WebRequest($.net.http.GET, "/all"); 
       client.request(req, dest);
       var response = client.getResponse();  
    $.response.contentType = "application/json";
       $.response.status = $.net.http.OK;
} catch (e) {
       $.response.contentType = "text/plain";

I've also added the cloud foundry's web service certificate in the trust store of xs hana admin portal.

When I set the "usessl" to false in the xshttpdest file, i get the following response..

Any help in this matter would be super helpful!



capture.png (38.1 kB)
capture1.png (40.6 kB)
capture3.png (43.3 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 07, 2017 at 05:07 PM

    Hi -- since we've released the GA version of Cloud Foundry in the SAP CP environment, we've made a lot of progress (and also logged more discussions on Would you please re-check your report and let us know if there is still an issue as above, by entering a new question based on the GA version? Thanks for engaging!

    Add a comment
    10|10000 characters needed characters exceeded