on 10-10-2017 9:41 AM
Dear all,
We have created a BSP application in our ECC (on HANA) system to use a function module returning a table. This BSP URL is then called in the XSJS service as per the guidelines in the wonderful video presentation by Thomas Jung:
https://www.youtube.com/watch?v=fWirvj9l7eY
However, we are getting error "Failed to send request to socket...rc = -1", when calling the webservice. Below is the http dest and XSJS file details:
HTTP Dest -
description = "Test HTTP Dest ABR"; host = "XXXX.XXXX.net"; port = 80; pathPrefix = "/sap/bc/bsp/sap/zhana_bsp_abr/test_bsp_abr.htm"; proxyType = none; useProxy = false; proxyHost = ""; proxyPort = 0; authType = basic; useSSL = true; timeout = 0; sslHostCheck = true; sslAuth = anonymous;
The destination lies in the same network so proxy is false.
XSJS file -
function testABR(){ $.response.contentType = "application/json"; var dest = $.net.http.readDestination("XSPOC", "test_abr"); var client = new $.net.http.Client(); var req = new $.web.WebRequest($.net.http.GET, ''); client.request(req, dest); var response = client.getResponse(); var body; if (response.body){body = response.body.asString(); } $.response.status = response.status; $.response.setBody(body) ; } testABR();
We have found several answers on SAP Answers but nothing fits this scenario.
https://answers.sap.com/questions/154640/hana-xs-js-failed-to-send-request-to-socket.html
https://answers.sap.com/questions/170725/hana-xs-js-web-service-call-error-request-failed.html
https://answers.sap.com/questions/81012/hana-xs-js-web-service-call-error.html
Please suggest in case you have any pointers.
Regards,
Abhishek Rajan.
Hi all,
We were able to resolve it by creating a trust store in the XS Trust Center and importing the destination system certificate to it.
Regards,
Abhishek.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek,
I have the same problem that you describe, but I don't undestand your resolution.
Can you explain me please?
Regards
Fabio
Hi Fabio,
Apologies for the late response.
You can go to the XS Admin web https://<server>:4300/sap/hana/xs/admin
Here, look for the 'Trust Manager' in the left menu option. A new Trust Store has to be created and in the certificate list, you need to import the server certificate for the destination application server you are configuring for your XS application. For us, our SAP ECC where the BSP page is created is the target application server.
You also need to add the 'Own Certificate' which identifies the HANA server.
These actions can be done once you have the sap.hana.xs.admin::TrustStoreAdministrator access added to your user.
Regards,
Abhishek.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.