Skip to Content
0

HANA XS JS Failed to send request to socket

Jan 11 at 01:26 PM

151

avatar image
Former Member

Hi,

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"

HttpDest

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

XSJS File

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";
	$.response.setBody(JSON.stringify({
      "speech": botR,
      "displayText": botR
    }));
	$.response.status = $.net.http.OK;
} catch (e) {
 	$.response.contentType = "text/plain";
 	$.response.setBody(e.message);
}
<br>
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.

0
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.

pulakesh

0

Hi pulakesh sardar,

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

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

0 Answers