Skip to Content
0
May 07, 2020 at 03:41 PM

Application Router in Cloud Foundry to Connect to ABAP System - Redirect problem

799 Views Last edit May 07, 2020 at 03:44 PM 2 rev

Hello,

I'm currenty havling an issue trying to setup a connection betwen our On Premise system and the cloud platform.

I've been following this tutorial: Consume an OData Service Using the Cloud Connector [https://developers.sap.com/group.cp-connectivity-odata.html]

I've setup the Cloud Connector as follows:

  • Back-end Type: ABAP System
  • Protocol: HTTP
  • Virtual Host: baco
  • Virtual Port: 8000
  • Principal Type: None
  • Host In Request Header: Use Internal Host

The connection is ok.

Then, in the SAP Cloud Platform, I setup as the tutorial says:

  • Name: GW
  • Type: HTTP
  • URL: http://baco:8000
  • ProxyType: OnPremise
  • Authentication: BasicAuthentication

Here, it gives me the following error, when I try to Check the Connection:

Failure reason: "Could not check at the moment. Please try again later".
I've also followed the rest of the setup, and have done has the tutorial says (setting up the application router, and binding all the services).

Now, when I try to open the generated Application Router URL it redirects the browser to http://baco:8000.

Why so? If there is a redirection, shouldn't it be to the Internal Host, as specified in the Host In Request Header property of the Cloud Connector?With some tests I also noticed that if on the Application Router configuration file xs-app.json I define a wrong route target, it does not redirect me to anywhere, and shows the Gateway response.For example:

{
    "routes": [
        {
            "source": "/",
            "target": "/sap/opu/odata/sap/TEST/",
            "destination": "GW"
        }
    ]
}
When I open the App Router URL I get the response:

No service found for namespace , name TEST, version 0001

On the other hand if I have it like this:

{
    "routes": [
        {
            "source": "/",
            "target": "/sap/opu/odata/TEST/",
            "destination": "GW"
        }
    ]
}
It will just redirect me to http://baco:8000.

If anyone knows why this happens, or happens to know a solution for this, I would be grateful. Best regards.