Use the SAP Connectivity ApiExt feature (provided by SAP Java Buildpack) to retrieve destination configurations or authentication headers ready to be used against the remote target system.
SAP Connectivity ApiExt is only available for Tomcat application containers included in SAP Java Buildpack.
Also, Spring Boot works with SAP Connectivity ApiExt only when using WAR deployment.
SAP Connectivity ApiExt is not the recommended way for consuming the Destination service as it only covers a subset of the service's APIs. It's primarily meant to be used internally by SAP Java Connector (SAP JCo) and for Neo migration scenarios, where there are limited possibilities to modify the code.
The recommended consumption mechanism for Java applications is SAP Cloud SDK for Java or using the Destination service REST API.
To use SAP Connectivity ApiExt during runtime, you first need to create:
- A service instance for the Destination service
- A destination entity in the Destination service that you want to retrieve from the application. See: Managing Destinations
- (Optional) A service instance for the Connectivity service – only needed if you plan to use it for destinations of type
ProxyType
=OnPremise
-
Open the
pom.xml
file of your Tomcat-based Java application and add the following dependency:<dependency> <groupId>com.sap.cloud.connectivity.apiext</groupId> <artifactId>com.sap.cloud.connectivity.apiext</artifactId> <version>${connectivity-apiext.version}</version> <scope>provided</scope> </dependency>
-
Now open the
manifest.yml
file and set environment variable USE_CONNECTIVITY_APIEXT to true:--- applications: - name: <APP_NAME> ... env: TARGET_RUNTIME: tomcat USE_CONNECTIVITY_APIEXT: true
-
Bind the previously created service instances to your application. To do that, add their names at the end of the
manifest.yml
file. For example:--- applications: - name: <APP_NAME> ... env: TARGET_RUNTIME: tomcat USE_CONNECTIVITY_APIEXT: true services: - my_destination - my_connectivity ...
For more information, see ConnectivityConfiguration API: Procedure
Related Information