Backend team has given a new Odata service. I declared it in manifest and used it in controller. It works correct in my system. But it does not work correct in any other environment. I get an error saying - initial loading of Metadata failed. and also some internal server errors.
Manifest.json
"ordersq": {
"uri": "/sap/opu/odata/sap/ZOrders_QUEUE_SRV/",
"type": "OData",
"settings": {
"odataVersion": "2.0",
"localUri": "localService/ZOrders_QUEUE_SRV/metadata.xml"
}
},
Controller:
var sServiceUrl = this.getOwnerComponent().getMetadata().getManifestEntry("sap.app").dataSources["ordersq"].uri;
var OdataModel = new sap.ui.model.odata.v2.ODataModel(sServiceUrl);
var sPath = "/BuyersQueueSet('" + mfOrder + "')";
OdataModel.read(sPath, {
success: this.queueSuccess.bind(this),
error: this.queueError.bind(this)
});
}
Is there something I am missing. Do I have to do something for that metadata.xml ? I did not configure anything more. I just copy pasted localuri how it is given for other services without adding any metadata for this new service.