cancel
Showing results for 
Search instead for 
Did you mean: 

BTP CAP: Connect to remote service locally hybrid

andreas_gall2
Participant

I am running a CAP NodeJS service with an UI consuming data from a HANA DB and a remote OData service from a on-premise backend gateway.

When deployed on BTP the service and UI runs fine, all data an be consumed. But I also want to do the same locally in the Business Application Studio while developing the app without the need to deploy it all the time.

I've followed this blog here BTP CAP : How to Connect to Remote Services Locally in CAP Application which works fine for accessing the HANA DB data. But whenever I access the remote service I get this error message:

{
  message: 'Error during request to remote service: \nFailed to load destination.',
  numericSeverity: 4
}

Within the package.json the remote service is set like this:

"externalSRV": {
  "kind": "odata-v2",
  "model": "srv/external/EXTERNAL_SRV",
  "credentials": {
    "destination": "on-premise-destination",
    "path": "/sap/opu/odata/sap/ZEXTERNAL_SRV",
    "requestTimeout": 300000
  }
}

Using the cds bind -2 command I basically bound all the services that are also bound to the CAP service on BTP. But I am still receiving the message that the destination could not be loaded. The destination is a destination with principal propagation.

Any ideas what else I could do in order to run the application locally in BAS?

Regards, Andreas

View Entire Topic
gregorw
Active Contributor
0 Kudos

Hi Andreas,

as you might not be connected via VPN to the on premise I would suggest to use sap-cf-proxy. Also even if the destination lookup would work, you still would have to establish a ssh connection to tunnel the request to the connectivity proxy.

CU
Gregor