From 0c7da35995aaa116ae54cc90c23afb3be6c255b6 Mon Sep 17 00:00:00 2001 From: sjvans <30337871+sjvans@users.noreply.github.com> Date: Fri, 15 Dec 2023 09:54:02 +0100 Subject: [PATCH] consuming services: connect to on-prem from bas (#570) * consuming services: connect to on-prem from bas * tip moved to node.js section * added profiling and tip --------- Co-authored-by: Rene Jeglinsky --- guides/using-services.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/guides/using-services.md b/guides/using-services.md index 53abe3ae4..fa1b129f2 100644 --- a/guides/using-services.md +++ b/guides/using-services.md @@ -664,6 +664,7 @@ If you receive `404` errors, check if the request contains fields that don't exi This works when accessing the entity directly. Additional work is required to support [navigation](#handle-navigations-across-local-and-remote-entities) and [expands](#handle-expands-across-local-and-remote-entities) from or to a remote entity. Instead of exposing the remote service's entity unchanged, you can [model your own projection](#model-projections). For example, you can define a subset of fields and change their names. + ::: tip CAP does the magic that maps the incoming query, according to your projections, to the remote service and maps back the result. ::: @@ -1208,7 +1209,7 @@ Your local application needs access to an XSUAA and Destination service instance [Learn more about `cds bind`.](../advanced/hybrid-testing#services-on-cloud-foundry){.learn-more} -#### Run a Node.js Application with a Destination +#### Run a Node.js Application with a Destination {.impl .node} Add the destination for the remote service to the `hybrid` profile in the _.cdsrc-private.json_ file: @@ -1239,6 +1240,10 @@ Run your application with the Destination service: cds watch --profile hybrid ``` +::: tip +If you are developing in the Business Application Studio and want to connect to an on-premise system, you will need to do so via Business Application Studio's built-in proxy, for which you need to add configuration in an `.env` file. See [Connecting to External Systems From the Business Application Studio](https://sap.github.io/cloud-sdk/docs/js/guides/bas) for more details. +::: + #### Run a Java Application with a Destination {.impl .java} Add a new profile `hybrid` to your _application.yaml_ file that configures the destination for the remote service. @@ -1266,6 +1271,10 @@ cds bind --exec -- mvn spring-boot:run \ [Learn more about `cds bind --exec`.](../advanced/hybrid-testing#run-arbitrary-commands-with-service-bindings){.learn-more} +::: tip +If you are developing in the Business Application Studio and want to connect to an on-premise system, you will need to do so via Business Application Studio's built-in proxy, for which you need to add configuration to your destination environment variable. See [Reach On-Premise Service from the SAP Business Application Studio](https://sap.github.io/cloud-sdk/docs/java/features/connectivity/destination-service#reach-on-premise-service-from-the-sap-business-application-studio) for more details. +::: + ### Connect to an Application Using the Same XSUAA (Forward Authorization Token) {#forward-auth-token}