0
votes

I have written a custom REST service with Java. This service doesn't contain any metadata. It only contains the services of certain entities which return the database data. The services have a JSON Format.

The SAPUI5 Overview page only seems to accept oData and require the metadata file of the entire service. Can I work around this somehow?

1

1 Answers

0
votes

Yes, you can always do this by a $.ajax call as:

 onInit : function() {  
    var oModel = new sap.ui.model.json.JSONModel();
    var aData = jQuery.ajax({
        type : "GET",
        contentType : "application/json",
        url : "Rest URL",
        dataType : "json",
        async: false, 
        success : function(data,textStatus, jqXHR) {
            oModel.setData({modelData : data}); 
            alert("success to post");
        }

    });

    return oModel;  
}
}