cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to On-Prem OData Service via XSHTTP Destination in XSJS

Aisurya
Participant
0 Kudos
725

Hi Experts,

Am not sure of the error .

Context : Am trying to execute an On-Prem OData Service. SCP is connected to ECC system via Cloud Connector .

XshttpDest Code:

host = "10.120.28.210";
port = 8000;
useSSL = false;
pathPrefix = "/sap/opu/odata/sap/EHS_INC_REPORTINCIDENT_SRV";
useProxy = true;
proxyHost = "localhost";
proxyPort = 20003;
timeout = 3000;

XSJS Code :

$.response.contentType = "text/html";
var dest = $.net.http.readDestination("Test_XSJS.OdataFromXSJS","gateway");
var client = new $.net.http.Client();
var req = new $.web.WebRequest($.net.http.GET, "/Locations?$format=json");
client.request(req, dest);
var response = client.getResponse().body.asString();
$.response.setBody(response);

While Executing Getting Error

Access denied to system 10.120.28.210:8000. In case this was a valid request, ensure to expose the system correctly in your cloud connector.

Already Configured Basis Authentication of ECC system in the XS Admin Tool for xshttpdest file.

Please help me.

Thanks and Regards,

Aisurya

Accepted Solutions (0)

Answers (4)

Answers (4)

gregorw
Active Contributor
0 Kudos

According to the documentation at Connectivity for SAP HANA XS (Enterprise Version) your destination configuration looks correct for a On-Prem Destination. If you still have the issue I would suggest to open an incident in the SAP Service Marketplace.

gregorw
Active Contributor
0 Kudos

Unfortunately the documentation which proxies need to be configured in HANA XSC on SCP are currently not available. But instead of localhost please try:

proxyHost = "proxy";
proxyPort = 8080;

and:

proxyHost = "proxy-trial";
proxyPort = 8080;

for SCP Trial (https://github.com/gregorwolf/XSauthLevelPoC/blob/master/odatapublic/google.xshttpdest)

lana_12
Employee
Employee
0 Kudos

Have you checked the cloud connector audit logs to see if there is any details there?

gregorw
Active Contributor
0 Kudos

Have you configured a HTTP destination to your on-prem system in the SCP Cockpit? Does this destination use the IP 10.120.28.210?

Aisurya
Participant
0 Kudos

Hi Gregor,

Yes HTTP is configured to on-prem system. Also, i have some applications running which are using this IP in SCP cockpit and able to connect to ECC .

10.120.28.210 = It is the Virtual IP of Orginal IP.

Regards,

Aisurya