Skip to Content
0
May 11, 2021 at 10:13 PM

SAPUI5 app on CF-> xs-app.json route destination in BTP not getting resolved

3796 Views Last edit Aug 31, 2021 at 08:50 PM 6 rev

Hello all,

I am facing an issue while calling 2 api using destination in my simple FIORI App .

  • I created a separate NodeJS application with its own router in CF to give me the user details. This service is working fine as a standalone service. I then created a destination in the BTP for this service
  • I also created a northiwind_v2 destination on BTP
  • I then created a SAPUI5 app and deployed it separately in CF using portal service and configured it in a site. In the xs-app.json, I have maintained a route for destination created earlier.

This app is visible in HTML5 applications on BTP subaccount.

  • In the view controller, i am making a $.AJAX call to the destinations mentioned above

In both the cases, I expect the routes to be resolved and correct API is to be called But it doesnt resolve and it takes the same URL of the fiori app and add the '/function' call/

Some code capture from my app

(1) This is the simple FIORI app without any app router and has xs-app.json with 2 destinations. This app is deployed using Launchpad service of BTP and is configured in a site.

northwind_v2:- of type 'No Authentication'

TestDestNPget :- of type 'OAuth2UserTokenExchange'

xs-app.json routes

(2) There is a destination service already bound to this app

(3) This the simple call in the controller.js

(4) When i run the app, i see error while calling the service.

Any advice ?

Regards,

Nilesh Puranik

Attachments

1.png (44.3 kB)
2.png (25.2 kB)
3.png (37.1 kB)
4.png (37.1 kB)
5.png (39.9 kB)
6.png (45.8 kB)
7.png (45.6 kB)
8.png (86.1 kB)