on ‎2019 Dec 20 3:34 AM
Hi
I am converting my CAP application from Java to Node.js. It consists of a HANA db, service and UI5 app. The server side development is straightforward. Where I am having issues is with the UI development within the WebIDE environment. In the Java world, I can create a new html application from a wizard (eg a worklist app) and run it by setting a runtime configuration for index.html in the Neo environment. On first launch of the app, a Neo destination is automatically created and from that point on the app just works out of the box. The Odata service is called and the data is populated. I am not able to do the same using node.js.
I took a step back from the real application and have created the following:
1. Create 2 CAP applications from the template, one using Java and the other using node. For the Java app, select Odata v4 (just to keep things consistent), keep the tickbox on for default data (bookshops,authors etc) and do not select XSUAA to keep it simple.
2. On both projects, build CDS, build Hana db and build and run service. No issues with any of this
3. For each project, right click and add HTML module, select the 'SAP Fiori worklist Application OData v4' template, select your odata service from the 'Current project', select 'standalone app' and map the view to the Books table.
4. Right click on the new html/UI5 module and create a runconfiguration for Neo running index.html. For the Java app, a new browser session is created and a popup to create a destination in Neo is shown requesting credentials. This is created in the background and then the applicatino launches and the list of books is shown. However, for the node application, no request to create a destination is received, the app is launched straight away but returns a 'technical error' in the popup which is due to the app being unable to read the metadata for the odata service. The UI5 app contains zero books.
I have reviewed the mta.yml, xs-app.json, manifest.json and they appear identical except for where differences are expected on the service definition for node vs Java.
What is required to make the UI5 app launch from the WebIDE in the same way the Java app does?
Regards
Neil
PS I was going to build the MTAR's and deploy to CF as another test, however, the MTAR builder does not seem to be working today. Once it comes good, I'll update with my findings
Request clarification before answering.
Hi Neil,
what you can try as a first workaround would be to configure CF instead of Neo in the run configuration. That solved the issue for me. But I've pinged the SAP Web IDE Team in Slack: https://openui5.slack.com/archives/C61AA31MH/p1576823886000600
CU
Gregor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neil,
I am just curious to know why are you migrating from java to nodejs. Is nodejs better than java. I can see opensap course materials are also based on nodejs. It would be nice if you can help me in understanding the better approach to CAP.
KR,
Sanjoy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neil,
As Gregor already mentioned, it will probably just work fine when running in CF. If you want to try it on NEO, you will have to create the destination to your service manually.
Kr, Wouter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 9 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.