Skip to Content
avatar image
Former Member

Calling an .xsjs service from an external Web Client

Hey guys,
i am very new to the backend part in web development and especially to SAP HANA. I am trying to set up a Web App which has a HANA DB in the backend.

I want to request and send data between my Hana DB and my Web App via Services. Now i have created a .xsjs on my Hana Server by which i can put data in my Hana DB by calling a URL to the .xsjs followed by some parameters like:
Now when i copy the URL in my Web Browser i have to authenticate and login to HANA first. After i login, the URL is calling and the parameters within the URL are written to my HANA DB table.

My question is now, how can i call the URL as a HTTP request inside of a client side Javascript file on my Web App?

When i try to call a simple $.Post(url) method i get following error:

"XMLHttpRequest cannot load. 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access."

I have added "Access-Control-Allow-Origin" : "" to my .xsaccess file but it didnt help.

Sorry for my bad english.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 07, 2017 at 12:44 PM

    Hi Arduc

    Have you found a fix for this?

    Add comment
    10|10000 characters needed characters exceeded