cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to on-premise Gateway system from SAPUI5 CF app on full stack Web IDE

saurabh_v
Active Participant
0 Kudos

Hello experts,

We have built an app for the Cloud Foundry environment on SAP Web IDE full stack. This app has the ui_deployer module, the approuter module and HTML5 module. Within the HTML5 module, we are trying to consume an OData service from an on-premise gateway system (using a Destination created for the on-premise system on Cloud Foundry). Below are how the xs-app.json and manifest.json files look like.

xs-app.json: (SID in the route below stands for the placeholder of the actual backend system ID)

{
  "welcomeFile": "/index.html",
  "authenticationMethod": "route",
  "logout": {
    "logoutEndpoint": "/do/logout"
  },
  "routes": [
    {
      "source": "^/<SID>_HTTPS/(.*)$",
      "target": "$1",
      "authenticationType": "none",
      "destination": "<SID>_HTTPS",
      "csrfProtection": false
    },
    {
      "source": "^(.*)$",
      "target": "$1",
      "service": "html5-apps-repo-rt",
      "authenticationType": "xsuaa"
    }
  ]
}

manifest.json:

"dataSources": {
			"services.xsodata": {
				"uri": "/cfdb/",
				"type": "OData",
				"settings": {
					"odataVersion": "2.0",
					"localUri": "localService/metadata.xml"
				}
			},
			"services.odata": {
				"uri": "/deq/sap/opu/odata/sap/<ODATA_SERVICE>",
				"type": "OData",
				"settings": {
					"odataVersion": "2.0",
					"localUri": "localService/<ODATA_SERVICE>/metadata.xml"
				}
			}
		}

....

"models": {
			"i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"settings": {
					"bundleName": "<namespace>.i18n.i18n"
				}
			},
			"services.odata": {
				"type": "sap.ui.model.odata.v2.ODataModel",
				"settings": {
					"defaultOperationMode": "Server",
					"defaultBindingMode": "OneWay",
					"defaultCountMode": "Request",
					"useBatch": true
				},
				"dataSource": "services.odata",
				"preload": true
			}
		}

When we try to run the UI5 application locally from Web IDE, we always see that the metadata URL of the OData service fails with a 500 Internal server error response as shown in the attached image. We cannot figure out what we might be missing to make the OData service call successfully from the app to the on-premise system. Can someone help us understand what we might be missing here?

500-internal-server-error.jpg

Regards,

Saurabh

Accepted Solutions (0)

Answers (0)