cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming a CAP OData service from SAP Mobile Services (on CF)

AlexGiguere
Contributor
0 Kudos
227

How do we consume an OData V4 service exposed by the SAP Cloud Application Programming Model (CAP) with SAP Mobile Services (Cloud Foundry).

After deploying my CAP MTA project, I would like to consume the OData service from this CAP project in Mobile Services for a native app, the mobile services & the cap deployed service are on the same subaccount

In mobile services CF, under connectivity, I need to add a destination to my OData service (there are different type of destination and it's not clear)

do I need to reference my app via a BTP destination or I simply use the CAP OData service URL?

example with the sample sap bookshop app

https://<subdomain>.cfapps.us10-001.hana.ondemand.com/odata/v4/bookshop

I also have a destination named bookshop-destination

thanks

 

View Entire Topic
Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert

 

You can go with either of these options:

  1. Provide the CAP OData service URL in your mobile destination.
  2. Define a destination in the BTP cockpit and refer to it from the mobile destination using the SAP Destination Service option. This option is quite useful if you want to reuse the same destination for multiple applications (e.g., mobile and Fiori projects) and manage it centrally.


 

AlexGiguere
Contributor
0 Kudos
thanks Jitendra, I like option 2, but what about the authentication type of this destination? Also, yes sometimes it could be helpful to have a Fiori app not part of a CAP project, for this I could reuse the same destination. When you deploy a CAP service with a Fiori app in the same MTA, it creates a destination service, are you talking about this one or just creating a new one in BTP?