html5sdk: issue with read operation using model API

d_farouk
edited March 15, 2020 in AppWorks #1

I'm using html5sdk to read array of objects from a model, however the array returns empty, anything i can modify in the code to get it working:

var empModel = new $.cordys.model({ objectName: "App", 
                                fields:[ "identity","name", "crn", "consumption"], 
                                defaults: { namespace: "http://schemas/BASSEGASProject/App/operations", 
                                           //dataType: "json",
                                            method: "GetAllApps" }, 
                                read:{ method: "GetAllApps" } 
                            });
 empModel.read().done(function(response) {
                        console.log(response);//empty array
                    }).fail(function() {
                        //alert('fail');
                    });