Establishing a Connection
To access SAP Gateway data in BizTalk, you need to configure the adapter and then configure the connection.
Configure the SAP Gateway Adapter
You can configure the adapter in the properties for the receive location or send port: Select the adapter in the Type menu, and then click Configure. You can then specify receive or transmit properties in the Transport Properties dialog that is displayed.
See Adapter Configuration for guides to configure the adapter for receive locations and send ports.
Configure the Connection
After you configure the adapter, you need to configure connection properties. In the Transport Properties dialog, click the button in the Connection String box. You can set connection properties in the dialog that is displayed.
Connecting to SAP Gateway
In addition to authenticating, set the following connection properties to access SAP Gateway tables.
- Url: Set this to the URL of your environment, or to the full URL of the service. For example, the full url might appear as: https://sapes5.sapdevcenter.com/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/. In this example, the environment url would just be: https://sapes5.sapdevcenter.com.
- Namespace: Set the appropriate Service Namespace. In the example above, IWBEP is the namespace. It is optional if the full url to the service is specified.
- Service: Set this to the service you want to retrieve data from. In the example above, the service is GWSAMPLE_BASIC. It is not required if the full url is specified.
Authenticating to SAP Gateway
SAP Gateway allows both basic and OAuth 2.0 authentication. You can use basic authentication to connect to your own account, or you can use OAuth to enable other users to retrieve data from your service with their accounts.
Authenticate via Basic Authentication
In basic authentication, you use your login credentials to connect. Set the following properties:
- User: This is the username you use to log in to SAP Gateway.
- Password: This is the password you use to log in to SAP Gateway.
Authenticate via OAuth Authentication
You can connect without setting any connection properties for your user credentials. Set InitiateOAuth to GETANDREFRESH to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
When you connect, the adapter opens the SAP Gateway OAuth endpoint in your default browser. Log in and grant permissions to the adapter. The adapter then completes the following OAuth process:
- Extracts the access token from the callback URL and authenticates requests.
- Obtains a new access token when the old one expires.
- Saves OAuth values in OAuthSettingsLocation to be persisted across connections.
See Using OAuth Authentication for other OAuth authentication flows.