Use SAP Connectivity Service with REST and SOAP

Last modified: April 18, 2024

1 Introduction

The SAP Destination Service is part of the OData Connector for SAP solutions and enables OData calls to be made using SAP destinations configured on SAP Business Technology Platform (SAP BTP). However, you can also use the destination information provided by the SAP Destination Service to make calls to non-OData services using Mendix native actions for consuming REST and SOAP.

This document describes how to configure a REST or SOAP call to use the configuration obtained from the SAP Destination Service.

2 Prerequisites

Before starting this how-to, make sure you have completed the following prerequisites:

  • Have a Mendix app which can be deployed to SAP BTP
  • Configured a PrincipalPropagation destination to an on-premises REST or SOAP service in your SAP BTP account; For more information, see SAP Destination Service
  • Imported an OData Connector for SAP solutions version higher than 4.0.0 into your app

3 Writing Your Microflow

In your microflow which is making a REST or SOAP call, perform a Get Destination action before the REST or SOAP call. This needs to use the Destination Name which is configured in a Destination on SAP BTP.

REST Microflow

The Get Destination action returns a Destination object. This is named as DestinationObject in the above example, and is used to configure the subsequent REST or SOAP call.

The Destination object has the properties shown in the image below:

Destination entity

3.1 Configuring a REST Call

Configuring a REST call needs following tab entries:

3.1.1 General Tab

The following entries are required in the General tab:

Entry Description
Location $DestinationObject/Url followed by any additional parameters
Proxy configuration Override
Use proxy true
Host $DestinationObject/ProxyHost
Port $DestinationObject/ProxyPort
Username $DestinationObject/SapConnectivityProxyCredentials
Password empty
REST general tab

3.1.2 HTTP Headers Tab

The HTTP Headers do the following:

  • Authenticate the app to perform the action via the connectivity service
  • Authenticate the app to the correct Shared Service Center (SSC) location
  • Authenticate the user to access the endpoint defined by the destination
  • Request to return the data in JSON format
Key Value
SAP-Connectivity-Authentication $DestinationObject/SapConnectivityAuthentication
SAP-Connectivity-SCC-Location_ID $DestinationObject/SapConnectivitySccLocationId
Proxy-Authorization ‘Bearer ’ + $DestinationObject/SapConnectivityProxyCredentials
Accept ‘application/json’

For more information, see rest-service-httpHeaders.

3.2 Configuring a SOAP Call

Configuring a SOAP call needs following tab entries:

3.2.1 Operation Tab

The following entries are required in the Operation tab:

Entry Description
Override location Checked
Location $DestinationObject/Url
Proxy configuration Override
Use proxy true
Host $DestinationObject/ProxyHost
Port $DestinationObject/ProxyPort
Username $DestinationObject/SapConnectivityProxyCredentials
Password empty
SOAP web service general tab

3.2.2 HTTP Headers Tab

The same HTTP Headers are required as for a REST call. They do the following:

  • Authenticate the app to perform the action via the Connectivity service
  • Authenticate the app to the correct SSC Location
  • Authenticate the user to access the endpoint defined by the destination
  • Request to return the data in JSON format
Key Value
SAP-Connectivity-Authentication $DestinationObject/SapConnectivityAuthentication
SAP-Connectivity-SCC-Location_ID $DestinationObject/SapConnectivitySccLocationId
Proxy-Authorization ‘Bearer ’ + $DestinationObject/SapConnectivityProxyCredentials
Accept ‘application/json’

For more information, see web-service-httpHeaders.

4 Read More