I am trying to create a WCF service but I am getting the following error which I have picked up from fiddler when making an Ajax call.
The server encountered an error processing the request. The exception message is 'Error in deserializing body of request message for operation 'GetRecords'. OperationFormatter encountered an invalid Message body. Expected to find an attribute with name 'type' and value 'object'. Found value 'boolean'.'. See server logs for more details. The exception stack trace is:
Could someone explain the error and what could be the cause please as i'm not sure what could be going wrong here.
I am sending an ajax request using POST. Here is my ajax request:
var url = "webservices/mainGrid/Nick.svc/GetRecords"
var source = {
dataType: 'json',
url: url,
type: "POST",
id: "SEQUENCE",
root: 'rowsinfo',
contentType: "application/json; charset=utf-8",
async: false,
cache: false,
columns:[],
datafields:[],
beforeprocessing: function (data) {
var columnsdata = new Array();
var datafieldsdata = new Array();
for (k in data.columnsinfo){
var col={};
col.text = data.columnsinfo[k]["DISPLAYNAME"];
col.datafield = data.columnsinfo[k]["DISPLAYNAME"];
var datafields={};
datafields.name = data.columnsinfo[k]["DISPLAYNAME"];
columnsdata .push(col);
datafieldsdata .push(datafields);
source.columns = columnsdata;
source.datafields = datafieldsdata;
}
$("#jqxgrid").jqxGrid({columns : source.columns});
},
data: {
group: JSON.stringify(checkedGroups),
staff: JSON.stringify(checkedStaff),
MODULE: selectedModuleSEQ
}
};
Any information on the error would be good! thanks