Skip to Content

Unable to use Hana xshttp Destination for hana productive account

Jul 03, 2017 at 06:08 AM


avatar image

Hi, I am trying to create a xshttpdestination file to run a xsjs file for my enterprise application. From xs-js I am trying to hit the destination configured in hana cloud platform which again is redirected towards the cloud connector to connect the on-premise Abap system. My account is:-

I have entered proxyhost=localhost and proxyport=20003 as well. But whenever I run the xsjs file, it gives me the error:- "Unable to extract request URI: URI must contain a host: /bad-request" . Could you guys please help.

I have also attached the xsjs file as well as the xshttp destination file .xshttpdest.png


xsjs.png (32.6 kB)
xshttpdest.png (23.8 kB)
10 |10000 characters needed characters left characters exceeded

Hello Hirak,

were you able to resolve this issue?

I have followed the exact steps in the below link: (Except for adding model_access role which I could not find it system)

However I get the below error

"Access denied to system XXX. In case this was a valid request, ensure to expose the system correctly in your SAP HANA Cloud connector"



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

2 Answers

Gregor Wolf
Sep 04, 2017 at 02:44 PM

Dear Hirak,

I've just tested with the following NPL.xshttpdest:

host = "u1604snw75.virtual";
port = 44300; 
pathPrefix = "";
authType = none;
useSSL = false;
timeout = 30000;
useProxy = true;
proxyHost = "localhost";
proxyPort = 20003;

and this ping.xsjs file:

var destination_package = "de.linuxdozent.cloudconnector";
var destination_name = "NPL";

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

and got

<html><body>Server reached.</body></html>

as a result. I would suggest that you try to reach that point. If you can't it's a case for an SAP Support Message.

Best regards

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Mr. Gregor,

Thanks for your help. Can you once confirm that the value of "HOST" and "PORT" mentioned in xshttpdest, are the same as configured under Cockpit->Connectivity->Cloud Connector ?
Thanks and Regards.


Hi Hirak,

yes, check out this screenshot:

Best regards

Hirak Bhowmick Sep 05, 2017 at 06:43 PM

Hi Mr. Gregor,

I have created a destination in HCP, the screenshot for the same is attached. Also attached is the screenshot of Cloud Connector and the xshttpdest along with the error faced.
Fig 1:- HCP Destination

Fig2:-Cloud Connector Configuration:-

Fig 3:- xshttpdest file(done same as the one mentioned by you):-

Fig 4:- Issue :-

Can you please check and let me know if there is any mistake from my end ?

Thanks and Regards.


1.jpg (85.0 kB)
3.png (3.9 kB)
2.png (8.6 kB)
4.png (9.1 kB)
Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Hirak,

have you tried to replace the hostname only cpslmofioridev with cpslmofioridev.virtual?

Best regards


Hi Gregor,

Thanks for your help.

Yes I have tried with the one you mentioned but still face the same issue. Please find below the screenshots.

fig 1:- xshttpdest

Fig 2:error after running the xs-js file.

Can you please recommend any other solutions or check if I am doing anything wrong.

Thanks and Regards.


5.png (11.2 kB)
6.png (7.4 kB)

Hello Guys,

Can you please help on this.