Skip to Content

HANA XS JS Failed to send request to socket

Jan 11 at 01:26 PM


avatar image
Former Member


I'm calling a service from XS Engine in my HCP Trial Account, but I get a socket error as follows please help.

Erro Message:

Erro Message:

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


description = "Gateway for CB";
host = "";
port = 443;
pathPrefix = "/ps1/PS1.xsodata/person";
proxyType = http;
proxyHost = "proxy-trial";
proxyPort = 8080;
authType = basic;
useSSL = true;
timeout = 0;
sslHostCheck = true;
sslAuth = client;


try {

var destination_package = "ps1";
var destination_name = "acb";
var dest = $.net.http.readDestination(destination_package, destination_name);
var client = new $.net.http.Client();
var req = new $.web.WebRequest($.net.http.GET,"?$format=json");
        req.contentType = "application/json";
	client.request(req, dest);
	var response = client.getResponse();
	var data = response.body.asString();
        var JSONObj = JSON.parse(data);
        var botR;
          for (var i = 0; i < JSONObj.d.results.length; i++) {
          botR += " ";
          botR += JSONObj.d.results[i].UID.Fname;

	$.response.contentType = "application/json";
      "speech": botR,
      "displayText": botR
	$.response.status = $.net.http.OK;
} catch (e) {
 	$.response.contentType = "text/plain";
I have already configured the certificate in trust store in xs/admin but 
still having the error.
10 |10000 characters needed characters left characters exceeded
Former Member

Hey Pulakesh,

Did you ever get this resolved? I get the same error in a similar scenario.

Former Member
Former Member

Hi Ayodeji,

Yes I have resolved it by myself, You need to set the trust certificate in Trust manager in XSADMIN page.



Hi pulakesh sardar,

How did you set the trust certificate in Trust manager in XSADMIN page? Where?

* Please Login or Register to Answer, Follow or Comment.

0 Answers