Hi Guys,
I state that are very newbie on SAP HANA.
I'm using SAP HANA Trial and trying to connect from SAP HANA to googe maps as described on tutorial "https://help.hana.ondemand.com/help/frameset.htm?a238abbe7bb141f1a66143da94697b95.html" but I'm not able to launch the application. When I indicate the full path into the browser "https://s6hanaxs.hanatrial.ondemand.com/pxxxxxxxtrial/myinst/hello2/connectivity/google_test.xsjs" I receive the message
"User is not authorized to use destination (package: connectivity.mapinfo, name: google)".
Can someone help me Please
Within the application I've create the subpackage "connectivity" that contains two files:
file: google.xshttpdest
host = "maps.googleapis.com";
port = 80;
pathPrefix = "/maps/api/distancematrix/json";
useProxy = true;
proxyHost = "proxy-trial";
proxyPort = 8080;
authType = none;
useSSL = false;
timeout = 30000;
File: google_test.xsjs:
var destination_package = "connectivity.mapinfo";
var destination_name = "google";
try {
var dest = $.net.http.readDestination(destination_package, destination_name);
var client = new $.net.http.Client();
var req = new $.web.WebRequest($.net.http.GET, "?origins=Frankfurt&destinations=Cologne&mode=driving&language=en-US&sensor=false");
client.request(req, dest);
var response = client.getResponse();
$.response.contentType = "application/json";
$.response.setBody(response.body.asString());
$.response.status = $.net.http.OK;
}
catch (e) {
$.response.contentType = "text/plain";
$.response.setBody(e.message);
}