cancel
Showing results for 
Search instead for 
Did you mean: 

Error during request to remote service: Failed to load destination.

darsh1327
Explorer
0 Kudos
2,718

Hello Community,

I am trying to connect to remote OData service via BTP Destination, it is working fine.

But for every change done in SAP CAP application, it requires the deployment of application to BTP.

So i wanted to test it locally connecting to the Remote OData Service but when i try cds watch --profile hybrid it fails the with this error "Error during request to remote service: Failed to load destination. Caused by: Could not find service binding of type 'destination'."

Requesting guidance how to connect to remote odata service from vs code, which reduces turn around time required for deployment to BTP and will be able test it locally in vs code for the changes carried.

Accepted Solutions (0)

Answers (2)

Answers (2)

Dinu
Active Contributor
0 Kudos

You have to bind to destination service. You can either bind to all the services including destination of a deployed application(bookshop-srv) using

cds bind --to-app-services bookshop-srv

or bind to destination service(destination-service-name) independently

cds bind -2 destination-service-name

 

darsh1327
Explorer
0 Kudos
Thank you Dinu, this is done but with cds watch --profile hybrid testing ,
darsh1327
Explorer
0 Kudos
but still failing to load the destination
Dinu
Active Contributor
0 Kudos
I suspect you have not created the destination service in cloud foundry. Do the following:
vitaly_kozyura
Advisor
Advisor
0 Kudos

Please check if you configured remote service correctly from the CAP  side:  https://cap.cloud.sap/docs/guides/using-services#connect-and-deploy,

Check your package.json configuration and your model: https://cap.cloud.sap/docs/guides/using-services#expose-remote-services

Check your CF configuration: There is a nice tutorial regarding remote service here https://developers.sap.com/tutorials/btp-app-ext-service-add-consumption.html#0a5ed8cc-d0fa-4a52-bb5...