on 01-11-2018 1:26 PM
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.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.