Skip to Content

consume OData into UI5 application : Access-Control-Allow-Origin

Hi Experts,

I'm trying to create simple application (displaying a table in UI5 by consuming OData services created in backend).

While executing the application in browser, I'm getting the below error:

Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:61195' is therefore not allowed access. The response had HTTP status code 401.

What I did is as below:

1. Create the OData service in backend (its running successfully, I tried it in gateway client).

2. Develop UI5 application with table in eclipse.

UI5 code as below:


Capture.PNG (23.9 kB)
Capture.PNG (32.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 21, 2016 at 12:45 PM

    I think I need to build a connection between Eclipse and SAP server.

    For that I have installed below plugin in eclipse:

    SAP NetWeaver Gateway Productivity Accelerator (GWPA)

    But still getting the error while establishing the connection:

    Capture.PNG (14.4 kB)
    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.