We are trying to use the OData service in MII to create an ODataModel in SAPUI5 to populate a Table. We are currently on SAP MII 15.0 SP3 Patch 2.
We have a Query in MII named: ODataTest\messages
We are using the OData Help Page, and are using the URL: http://server:port/XMII/IlluminatorOData/Rowsets('ODataTest/messages')/Rowset
This url works in the web browser as well as in an HTTP Post Action Block, and returns with the records that are expected. The problem comes when we try using it in an ODataModel in SAPUI5.
var oModel = new sap.ui.model.odata.ODataModel("http://server:port/XMII/IlluminatorOData/Rowsets('ODataTest/messages')/Rowset");
We get an error on the line above trying to retrieve the metadata information:
From the help page above the metadata should be fetched from http://server:port/XMII/IlluminatorOData/$metadata, however I do not think we can manually override where SAPUI5 looks for the metadata.
Does someone know what we do in order to get the ODataModel working an MII Query? We have tried different types of queries (FixedQuery, ExecuteQuery, etc) in MII, and we can access them all in the browser, but fail when creating the ODataModel. Thank You