Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
miltonc
Product and Topic Expert
Product and Topic Expert
Github repository:

To be published soon...

 

Introduction:

  • In this session, we will look at how to connect Node.js application to public and On-Premise systems in SAP Cloud Platform - Cloud Foundry environment


 

Synopsis:

  • In the previous sessions, we had looked at how to connect SAPUI5 applications to public and On-Premise systems

  • The key differentiator between SAPUI5 application and Node.js application is that the Node.js application runs on the backend whereas the SAPUI5 application runs on the browser

  • We will make use of axios - a popular npm package for making HTTP requests

  • The Connectivity Service and Destination Service together can be used to connect to On-Premise systems

  • The Connectivity Service acts as a standard HTTP proxy to connect and retrieve data from the On-Premise system


 

Steps:

  • In this example, we will create a simple Node.js application and consume the publicly available Northwind OData Service

  • Then we will modify the Node.js application to consume the publicly available Northwind OData Service - but this time reading key information from the Destination Service

  • We will then consume the On-Premise OData Service using both the Destination Service and the Connectivity Service


 

YouTube link:

https://youtu.be/bJitwHPVZfQ

 

Conclusion:

  • This video should give you a clear idea on how to use the Destination Service and Connectivity Service together in a Node.js application to connect to both publicly available endpoints and On-Premise systems

  • If you have questions or comments, please list them below and I will be happy to answer


 

Previous post:

https://blogs.sap.com/2020/09/19/how-to-connect-applications-to-on-premise-system-cloud-foundry-envi...
4 Comments
0 Kudos
Very informative blog.
farhan25ah
Explorer
0 Kudos
Hello Milton,

Could you please help me on below error?

I have followed the exact steps given in your videos including the other video for destination.

error -
502 Bad Gateway: Registered endpoint failed to handle the request.
miltonc
Product and Topic Expert
Product and Topic Expert
0 Kudos
Couple of questions...

  • Are you connecting to On-Premise or Cloud backend system ?

  • Do you know if your request is reaching the backend system ?

  • If your request is reaching the backend system and the backend system is failing - then you have to debug the backend system

  • If your request is not reaching the backend system at all, then something is wrong with your destination / connectivity set up or in the code - In this case, I will need more info to figure out what is wrong...

farhan25ah
Explorer
0 Kudos
Hello Milton,

 

Thanks for your reply.

My issue has been resolved. There was an issue with the destination.

It is resolved by creating below instance and bind it to my app:

Destination Service

Connectivity Service

Authorization and Trust Management Service