on 08-18-2017 11:56 AM
Hi All,
I need to consume the OData service created in using Apache olingo in java. I deployed that in tomcat and able to view the entity set and metadata info on the browser. Now i need to consume that in my sapui5 app. below i shared the content .
My Project Structure:
My UI5 app web app folder and index.html navigation link:
My working service url in my browser:
My SAPUI5 master list app screen :
My Master.view.xml code where i mention the list items(Products entity set):
Thank you,
Regards,
JK
Did you define the model?
Regards,
Jamie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jayakrishnan
Very interesting post!
It looks like a Maven-style Web application with SAPUI5 as UI framework. The folder structure of the UI5 application is like the project template from the HANA cloud with manifest.json and Component.js rather than the SAPUI5 project template from Eclipse. Nicely done!
Q1: May I ask where you deploy it? Does it run in Tomcat?
Q2: What is your database, and related to that, what is the role of Olingo? I suspect the database is not HANA. So you cannot simply add an xsodata file. I guess you have a non-OData database, maybe an SQL database, and you are using Olingo to accomplish the equivalent of xsodata. Is this correct?
Best regards
Hi Jayakrishnan,
you first need to define the odata model in the mainifest.json as Jamie mentioned. Beside that, regarding the Cross-Origin Resource Sharing (CORS) issue, you have to refer your odata source through the ui5 proxy. In your case, the url in the mainifest.json would be:
"uri":"proxy/http/localhost:8080/DemoService/DemoService.svc"
Hope it helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.