Skip to content

gregorwolf/epmbp-consumer-app-java

Repository files navigation

EPM Business Partner - Consumer App Java

This example application is still work in progress. It should demonstrate how to use a custom built OData Service with the SAP Cloud SDK for Java and the SAP Cloud Application Programming Model. And that with authentication and principal propagation. So that the service in the ABAP Backend is called not with a technical user, but with the user that was authenticated in the SAP Cloud Platform.

With the help of Marcel Merkle who answered the question JWT not recognized by xsuaa-spring-boot-starter the authenticated call to the Java service module is now working. The on premise backend call using the approuter also works. And thanks to the answer provided by Alexander Duemont in Principal Propagation is not working in the latest version of SAP Cloud SDK now also the call to the on premise backend works with principal propagation.

Run local

To run against the local mock service epmbp-mock-service you have to set the environment variable destinations:

#!/bin/bash
export destinations='[{name: "S4H_CC", url: "http://localhost:3000"}]'

The authentication data is maintained in the file srv/src/main/resources/application.yaml

Then execute:

npm run setup

Followed by:

npm start

Deploy to SAP Cloud Platform - Cloud Foundry

Prerequisite

Preperation

Before you can deploy the application to your Cloud Foundry account two destinations must be created. Please find here what I've used in my environment:

Destination NPL used by the approuter and SAP Cloud SDK:

URL=http\://npl752.virtual\:44300
Name=NPL
ProxyType=OnPremise
Type=HTTP
sap-client=001
Authentication=PrincipalPropagation

Build

npm run build:cf

Deploy

npm run deploy:cf

About

EPM Business Partner - Consumer App - Java

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published