Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Getting Started

This is a sample CAP application that mimics the Northwind OData service, both V2 and V4. It can optionally be used in conjunction with the managed-html5-runtime-fiori-launchpad-mta to replace the original Northwind service - demonstrating how to consume CAP service from that sample.

The original public Northwind service does not require any authentication, whereas this CAP project requires XSUAA authentication. By deploying this CAP application in the same Cloud Foundry space as the managed-html5-runtime-fiori-launchpad-mta, you override the destination URL of the original Northwind service with the URL of this CAP service, and additionally set the HTML5.ForwardAuthToken property. This allows you to consume the CAP service instead of the public Northwind service. The deployment of this CAP application also binds the CAP service to the XSUAA service already created by the managed-html5-runtime-fiori-mta package.

Deployment

  1. Deploy the managed-html5-runtime-fiori-mta to your BTP subaccount as explained in the package documentation.
  2. Add the entitlement hana hdi-shared to your subaccount if you haven't done so already.
  3. Build the project:
    npm run build
    
  4. Deploy in the same subaccount/space as the managed-html5-runtime-fiori-mta package:
    cf deploy mta_archives/sample-northwind-cap.mtar
    

Check the Result

Check the SAP Fiori Application

To make sure to use the new mock service, open an incognito browser window and access the URL of the HTML5 App of the managed-html5-runtime-fiori-mta package. You should see (almost) the same data as before, however the product name of the first product will be Hello from CAP - this is the mark that the data is read from the CAP service.

image