With this blog I would like to recap here all the steps to consume, with SAP Web IDE, data coming from a HANA XS instance located on the Trial landscape. There have been a lot of discussions around this topic on SCN, with many pieces spread around: for this reason I would like to show a step-by-step procedure to achieve this goal.
Let's give a look to the current architecture: if we want to connect our SAP Web IDE to an OData source like to the HANA XS instance we need to go through the creation of a destination in the HANA Cloud Cockpit, which connects on its turn to a Cloud Connector installed either on a local workstation or on a centralised server.
The Cloud Connector should be then able to connect to the HANA XS service. Unfortunately this is not possible on HANA Trial because for this landscape the Cloud Connector should be able to go through the SAML2 authentication, but as of now this is not possible.
To overcome this issue we could use a workaround, we could install a proxy in between the two things: HANA XS instance on one side and Cloud Connector on the other. This proxy server will be able to accept requests coming from Cloud Connector and translate them in SAML2 requests to forward to the HANA XS instance.
There is already a proxy, created by a SCN user, Gregor Wolf, that plays this role: it's located here.
The installation of this proxy is pretty simple and we'll see it in the next steps.
This is the list of the main steps we'll go through:
NOTE: For this exercise we are supposing that you already have a Trial HANA XS service to consume. If you don't have one or if you just want to create a basic one by yourself, you can follow another blog of mine: How to create a new OData service using the Web-Based Workbench (v2.0)
Let's get started!
Let's start with the installation of the proxy. This is the piece with the green arrow you see in the architecture picture. It will take care of communicating with the HANA XS instance on the Trial landscape. For this reason we have to provide it with the URL to the HANA XS service.
(i.e. from "https://s6hanaxs.hanatrial.ondemand.com/i045523trial/dev/myproducts/services.xsodata" take just "s6hanaxs.hanatrial.ondemand.com")
http://localhost:7891<path_to_the_service>/$metadata where the <path_to_the_service> string is the part of the service URL after the host name (i.e. /i045523trial/dev/myproducts/services.xsodata)
Let's now create a new access control in the Cloud Connector.
Create a new destination for the service URL you configured as the virtual URL in the Cloud Connector.
Parameter | Value |
---|---|
Name | hanaxs |
Type | HTTP |
Description | hanaxs |
URL | <the virtual URL with port defined in the Cloud Connector (i.e. http://hanaxs.virtual:8080/)> |
ProxyType | OnPremise |
CloudConnectorVersion | 2 |
Authentication | BasicAuthentication |
User | <hana_trial_user_for_the_service> |
Password | <hana_trial_password_for_the_service> |
Property | Value |
---|---|
WebIDEUsage | odata_xs,odata_gen |
WebIDEEnabled | true |
WebIDESystem | <the same name of the destination> (i.e. hanaxs) |
https://webide-<your_hana_trial_account>.dispatcher.hanatrial.ondemand.com/destinations/hanaxs/<path_to_the_service>/$metadata
where <your_hana_trial_account> is the account you use for SAP Web IDE and <path_to_the_service) is the string just after the host name in your service URL
The final step is to create a SAP Web IDE project to consume the OData service.
Congratulations! You have successfully consumed your HANA XS OData service with SAP Web IDE.
User | Count |
---|---|
20 | |
15 | |
14 | |
11 | |
11 | |
10 | |
8 | |
8 | |
7 | |
7 |