on 07-16-2019 7:19 AM
Hi All,
I am trying to consume Rest API via destination service in my UI5 application.
But it is giving the following error:
Please find below the steps i followed :
1.Backed system is onPremise system:Hence using cloud connector to establish the connection.
hcp cockpit screenshot.
2.Declared Destination in hana cockpit:
3.Defined destination in neo-app.json file.
{ "path": "/P4MSAPI", "target": { "type": "destination", "name": "P4MSAPI" }, "description": "User Data API" }
4.Defined model and datasource in manifest.json file
"P4MSAPI": { "type": "sap.ui.model.json.JSONModel" }
_______________________________________________________________________________________
"sap.app": { "id": "SampleP4MS.SampleP4MS", "type": "application", "i18n": "i18n/i18n.properties", "applicationVersion": { "version": "1.0.0" }, "title": "{{appTitle}}", "description": "{{appDescription}}", "sourceTemplate": { "id": "servicecatalog.connectivityComponentForManifest", "version": "0.0.0" }, "dataSources": { "P4MSAPI": { "uri": "/P4MSAPI/user", "type": "JSON" } } },
5.Trying to directly bind model(P4MSAPI) in view file.
approach 1:
<Title textAlign="Left" titleStyle="H5" text="{P4MSAPI>/name}">
OR approach 2:
// creates a model and attach it to the view
this.getView().setModel(new JSONModel(), "P4MSAPI");
// do a GET request
this.getModel("P4MSAPI").loadData( "/P4MSAPI/user" );
Please suggest what can be done in such case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As per the current destination configuration settings below mentioned additional properties are being used.
WebIDEUsage:api_mgmt_proxy,api_mgmt_catalog,api_mgmt_proxy,odata_abap,dev_abap,ui5_execute_abap,odata_gen
,bsp_execute_abap
WebIDEnabled: True
WebIDESystem : P4MSAPI
Even if we remove WebIDESystem property still the purpose is not getting resolved.
Please suggest if any other additional properties are to be used for working with rest api or json data?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Leo,
Yes, https is correct .we are using sso secure connection and the status is 200 OK,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.