cancel
Showing results for 
Search instead for 
Did you mean: 

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

former_member203070
Participant
0 Kudos

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:

Error:

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member203070
Participant
0 Kudos

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: