on 2021 May 11 7:17 AM
I have a UI5 app where, in the manifest.json, I have defined an OData data source with a settings/localUri directive that points to a local metadata file.
However, the UI5 framework ignores this directive and instead always fetches the metadata from the service root as defined in uri value of the data source definition.
Why is UI5 ignoring my localUri directive?
Here is a relevant (modified) excerpt from my manifest.json:
"dataSources": {
"C4C_ODATAAPI": {
"uri": "https://mynnnnnn.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/$metadata",
"type": "OData",
"settings": {
"localUri": "localService/c4codataapi.edmx.xml"
}
}
}
Request clarification before answering.
Hi Martin,
Have you found a solution in order to get the application reading the metadata from a local file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
That's funny, because, I had exactly the same issue this week, and luckily for you, I found out the solution 🙂
Here is my manifest :
"mainService": {
"uri": "/sap/opu/odata/sap/ZHR_BLABLABL_SRV/",
"type": "OData",
"settings": {
"annotations": [
"annotation",
"ZHR_BLABLABL_ANNO_MDL"
],
"localUri": "localService/metadata.xml"
}
},
"annotation": {
"type": "ODataAnnotation",
"uri": "annotations/annotation.xml",
"settings": {
"localUri": "annotations/annotation.xml"
}
},
...
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In my case, however, it is not even attempting to read the local file from the localUri path.
In F12 in the browser, I only see it loading the metadata from the service root. It does not even attempt to read my local metadata file.
I also do not have any annotation in my app; not sure if that makes a difference, or is important?
User | Count |
---|---|
58 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.