Skip to content

Commit

Permalink
consuming services: connect to on-prem from bas (#570)
Browse files Browse the repository at this point in the history
* consuming services: connect to on-prem from bas

* tip moved to node.js section

* added profiling and tip

---------

Co-authored-by: Rene Jeglinsky <[email protected]>
  • Loading branch information
sjvans and renejeglinsky authored Dec 15, 2023
1 parent 16db549 commit 0c7da35
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion guides/using-services.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
:::
Expand Down Expand Up @@ -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:

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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}

Expand Down

0 comments on commit 0c7da35

Please sign in to comment.