Skip to Content
0

Hi Guys, I use the controller to connect to a service, but its giving me error?

Apr 21, 2017 at 08:19 AM

14

avatar image
Former Member

I use an ajax call like this:

var oModel = new sap.ui.model.json.JSONModel();
$.ajax({
type : "GET",
contentType : "application/json",
url : "https://test01p1942552132trial.hanatrial.ondemand.com/learning/test/userdetails.xsodata",
dataType : "user",
async: false,
success : function(data,textStatus, jqXHR) {
oModel.setData({modelData : data});
sap.m.MessageBox.alert("success to get");
}

});

return oModel;
}

But the URL is giving error saying non relative URL found; can you help?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers