Skip to Content
author's profile photo Former Member
Former Member

Use of SSL in XS Outbound Call (HANA Trial)

From my XSJS program I wish to make an outbound API call which requires SSL/HTTPS. My XSJS looks like this

function callApiById(id, api_id, api_key){

try {

var evercam = $.net.http.readDestination("p123456789trial.brevitylabs.tallyho.services", "tallyho");

var client = new $.net.http.Client();

var request = new $.web.WebRequest($.net.http.GET, id + "?api_id=" + api_id + "&api_key=" + api_key);

(and so on ... rest is usual)

My destination looks like

description = "Tallyho API HTTPS Connection";

host = "api.tallyho.in";

port = 443;

useSSL = true;

pathPrefix = "/apps/index.php/lookup/items/type/state";

authType = none;

useProxy = true;

proxyHost = "proxy-trial";

proxyPort = 8080;

timeout = 30000;

(Note I am using HANA trial instance so I have to use those proxy details. Also not that I am using port 443 and useSSL true).

I have linked the default TrustStore (accounts.sap.com) with this package.

What have I left in the process that I am getting the following error?

ERROR: HttpClient.request: request failed. The following error occured: unable to establish connection to api.tallyho.in:443 - internal error code: SapSSLSessionStart failed. See trace for details.


Of course, I have tried this by changing port to 80 and useSSL to false. I get a message from the server (not an error) stating that the site allows only SSL. The body part of the response JSON looks like this -


"body":"Sorry, all API calls must be made via https. Redirecting...\n"

Is there anything I need to do in terms of setting a new TrustStore or add XSJS code to handle secured communication related code? Any pointer would help me.

Regards.

hana-xs-app.png (45.8 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 18, 2015 at 12:14 PM

    This message was moderated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.