cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to use Hana xshttp Destination for hana productive account

Former Member
0 Kudos

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:- us1.hana.ondemand.com.

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

former_member527468
Participant
0 Kudos

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)

https://help.sap.com/viewer/cca91383641e40ffbe03bdc78f00f681/Cloud/en-US/0022f78f5d4d4e858c909b2d062...

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"

Thanks,

Ajith

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Hirak

gregorw
Active Contributor
0 Kudos

Hi Hirak,

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

Best regards
Gregor

Former Member
0 Kudos

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.

Hirak

Former Member
0 Kudos

Hello Guys,

Can you please help on this.

Regards.

Hirak

gregorw
Active Contributor
0 Kudos

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.setBody(response.body.asString());
    $.response.status = $.net.http.OK;
} catch (e) {
       $.response.contentType = "text/plain";
       $.response.setBody(e.message);
}

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
Gregor

Former Member
0 Kudos

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

gregorw
Active Contributor
0 Kudos

Hi Hirak,

yes, check out this screenshot:

Best regards
Gregor