cancel
Showing results for 
Search instead for 
Did you mean: 

403 Error in accessing Gateway oData using Cloud Platform Destination in SAPUI5

SandipAgarwalla
Active Contributor
0 Kudos

Hi All

I have this UI5 App which is deployed on Cloud Platform, which will access oData service from a backend Gateway System. For this, a destination has been created. For accessing the Service, I have defined the models and path as follows

manifest.json

-------

"dataSources": {
"RGT_INSPRES_SRV": {
"uri": "destinations/gateway/sap/opu/odata/<odata_service>",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "localService/metadata.xml"
}
}
}

The Path entry in the neo-app.json

 {
      "path": "destinations",
      "target": {
        "type": "destination",
        "name": "gateway",
        "entryPath": "/sap/opu/odata"
      },
      "description": "<<someDescription>>"
    }

Accessing the App after a fresh deployment gives 403 error on the metadata

Any inputs what could be wrong here?

Thanks

Sandip

Accepted Solutions (0)

Answers (3)

Answers (3)

architectSAP
Active Contributor

Hello Sandip,

I am afraid your your path entry in neo-app.json does not look right.

If you were new to SAPUI5, I would suggest that you build an SAPUI5 application from one of the templates and examine the neo-app.json it creates. This will give you an isight how to confugure your own.

Very best regards

Farnk

SandipAgarwalla
Active Contributor
0 Kudos

Hello Frank, Abhishek

The path mentioned in the neo-app wasn't right. Now it works fine.

{"path": "/sap/opu/odata","target": {"type": "destination","name": "gateway","entryPath": "/sap/opu/odata"},"description": "<<someDescription>>"}

Thanks

Sandip

AbhishekSharma
Active Contributor
0 Kudos

Hi Sandip,

Please try updating your manifest.json as below :

"dataSources": {
			"GWSAMPLE_BASIC": {
				"uri": "/es4/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/",
				"type": "OData",
				"settings": {
					"odataVersion": "2.0",
					"localUri": "localService/metadata.xml",
					"annotations": []
				}
			}
		}

In Uri parameter put '/' at end.

Thanks-

Abhishek