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

Using Gateway to get service data to an ODataModel in UI5

$
0
0

Hi

 

I need help regarding how to get data from a service on my gateway in UI5 using ODataModel.

 

I use this code:

 

  try {

    oModelLocationsBE = new sap.ui.model.odata.ODataModel(gServiceURL, true, gServiceUser, gServicePassword,null);    

  }

  catch(ex) {

    alert(ex);

  }

  finally {

    // Do nothing here!

  }

 

And i get an object returned.

 

Now when I try to get my data using .read method on my object, i get an error. The code is:

 

  oAbort = oModelLocationsBE.read("",null,null,null,beGetLocationData_OnSuccess,beGetLocationData_OnError);

 

I tried to use the method .getHeaders() and it returns an object - but what is the format of this object? How can I check its content?

 

Best regards,

Kell Vagtholm


Viewing all articles
Browse latest Browse all 6178

Trending Articles