on 04-27-2023 12:24 PM
Good Morning boys.
my SAPUI5 application tells me the following:
but the data source is configured correctly
Manifest.json
<code>{
"_version": "1.8.0",
"sap.app": {
"id": "com.mycompany.z_fspm_car_valuation",
"type": "application",
"i18n": "i18n/i18n.properties",
"applicationVersion": {
"version": "1.0.0"
},
"title": "{{appTitle}}",
"description": "{{appDescription}}",
"sourceTemplate": {
"id": "servicecatalog.connectivityComponentForManifest",
"version": "0.0.0"
},
"dataSources": {
"ZGW_CAR_VALUATION_SRV": {
"uri": "https://aws-wdq.mycompany.com.ar:51025/sap/opu/odata/sap/ZGW_CAR_VALUATION_SRV/",
"type": "OData",
"settings":{
"odataVersion": "2.0"
}
}
}
},
"sap.ui": {
"technology": "UI5",
"icons": {
"icon": "",
"favIcon": "",
"phone": "",
"phone@2": "",
"tablet": "",
"tablet@2": ""
},
"deviceTypes": {
"desktop": true,
"tablet": true,
"phone": true
},
"supportedThemes": [
"sap_hcb",
"sap_belize"
]
},
"sap.ui5": {
"rootView": {
"viewName": "com.mycompany.z_fspm_car_valuation.view.AppView",
"type": "XML"
},
"dependencies": {
"minUI5Version": "1.30.0",
"libs": {
"sap.ui.layout": {},
"sap.ui.core": {},
"sap.m": {}
}
},
"contentDensities": {
"compact": true,
"cozy": true
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "com.mycompany.z_fspm_car_valuation.i18n.i18n"
}
},
"": {
"uri": "https://aws-wdq.mycompany.com.ar:51025/sap/opu/odata/sap/ZGW_CAR_VALUATION_SRV/",
"type": "sap.ui.model.odata.v2.ODataModel",
"settings": {
"defaultOperationMode": "Server",
"defaultBindingMode": "OneWay",
"defaultCountMode": "Request",
"useBatch": false
},
"dataSource": "ZGW_CAR_VALUATION_SRV",
"preload": true
}
},
"resources": {
"css": [
{
"uri": "css/style.css"
}
]
},
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"async": true,
"viewPath": "com.mycompany.z_fspm_car_valuation.view",
"controlAggregation": "pages",
"controlId": "idAppControl",
"clearControlAggregation": false
},
"routes": [
{
"name": "main",
"pattern": "",
"target": [
"AppView"
]
},
{
"name": "detail",
"pattern": "detail/{YEAR}/{CODVAL}/",
"target": [
"VehicleDetail"
]
}
],
"targets": {
"AppView": {
"viewType": "XML",
"transition": "slide",
"clearControlAggregation": false,
"viewName": "AppView"
},
"VehicleDetail": {
"viewType": "XML",
"transition": "slide",
"clearControlAggregation": false,
"viewName": "VehicleDetail"
}
}
}
},
"sap.platform.abap": {
"uri": "/sap/bc/ui5_ui5/sap/zfspm_car_val",
"_version": "1.1.0"
}
}
All the configuration is perfect, I have already consumed the odata service of "Northwind" ( https://services.odata.org/V2/Northwind/Northwind.svc/ ) in the same way and it works, but the service I am trying to consume does not work.
The service and Postman tell me "200 ok".
Postman says: "Unable to get local issuer certificate"
I am trying to consume the odata service of my company where I work.
Hi Federico,
An OData service would be hosted on the same domain as your UI5 app if it is deployed on the same server as your app. For example, if you have a web application developed using UI5, and you deploy the application and the OData service on the same SAP NetWeaver ABAP server, then they will be hosted on the same domain.
If your OData Service is hosted on the same domain as your Ui5 app, try giving only the relative path in the manifest only:
"ZGW_CAR_VALUATION_SRV":{
"uri": "/sap/opu/odata/sap/ZGW_CAR_VALUATION_SRV/",
...}
However, if the OData service is deployed on a different server, then it will be hosted on a different domain. In such cases, you will want to use SAP BTP destinations to access the OData service from your UI5 app. In your xs-app.json file, you then define a route that points to the destination in your BTP account. The n you can make requests to the destination using a relative URL that matches the route.
xs-app.json
"routes": [
{
"source": "/my-odata-service/(.*)",
"destination": "my-odata-service-destination"
}
]
This is not needed in Postman as the HTTP request is not subject to the same-origin policy or CORS restrictions. Postman is a standalone app that sends requests directly from your computer to the destination server, so there is no browser involved.
p.s. we're not all boys..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
that's not correct.
it should be relative url.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.