on 07-03-2017 7:08 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.