Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

SAPUI5 - $metadata appended while calling Gateway service

$
0
0

Hi ,

 

I am trying to build a simple application of connecting to one of our Gateway service.

 

I had some issue in the same origin policy and then I edited my web.xml file.

 

In the controller in the onInit() , I add the following -

 

                    var sServiceUrl = "/sap/opu/odata/sap/Z_INSPECTIONS_SRV/PreviousFIRs(filename='150005-080411.pdf')";

                    var oModel = new sap.ui.model.odata.ODataModel(sServiceUrl,true,username,password);

                    sap.ui.getCore().setModel(oModel);

 

 

    

In the view , I am binding Table  rows with the following collection like

oTable.bindRows("/PreviousFIRs");

 

Now the problem is when I run this and do the inspect Element in Google Chrome, I see $ metadata being appended in the Gateway service call like

 

  http://username:password@localhost:58328/org.csagroup.inspections/proxy/http/csasgd1.sap.csa-group.org:8000/sap/opu/odata/sap/Z_INSPECTIONS_SRV/PreviousFIRs(filename='150005-080411.pdf')/$metadata

 

Any  help on how to fix this would be highly appreciated.

Thanks, Shiv


Viewing all articles
Browse latest Browse all 6178

Trending Articles