The final code, working successfully:
var reportObj = {};
reportObj.width = 1200;
reportObj.height = 1000;
reportObj.title = "Report";
reportObj.colModel = <%= attributeComp.getReportColumnModel() %>;
reportObj.dataModel = {
location: "remote",
sorting: "local",
dataType: "XML",
method: "POST",
error: function(jqXHR, textStatus, errorThrown) {
xmlDoc = $.parseXML( jqXHR.responseText ),
$xml = $( xmlDoc ),
$rr = $xml.find( "return" );
if ($rr.text().toLowerCase().indexOf("error") > -1 ) {
alert("Report unsuccuessful. An error occured: " + textStatus + " " + $rr.text());
}
},
getData: function(response, textStatus, jqXHR) {
//alert(jqXHR.responseText);
xmlDoc = $.parseXML( jqXHR.responseText );
$xml = $( xmlDoc );
$rr = $xml.find( "return" );
if ($rr.text().toLowerCase().indexOf("error") > -1 ) {
alert("Report unsuccuessful. An error occured: " + $rr.text());
} else {
alert($rr.text());
try {
var rdata = $.parseJSON($rr.text());
} catch ( eeee ) {
alert("Report unsuccuessful. An error occured: " + eeee);
}
alert('5');
}
return { data: rdata.data };
},
getUrl: function() {
$.ajaxSetup({
contentType : "text/xml"
});
var rObjectId = jQuery('#contractObjId').val();
var rjson = "{ r_object_id : '" + rObjectId + "', encryptedUsername : 'IL9ll', encryptedPassword : 'apx6TrB+', encryptedRepository : 'QlRDcYjMxVX2k' }";
var soapMessage = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.prodagio.com"><soapenv:Header/><soapenv:Body><ser:refreshReport><json>' + rjson + '</json></ser:refreshReport></soapenv:Body></soapenv:Envelope>';
var webServiceURL = 'http://x.com/services/xDFS/AboveTheLineContractService?wsdl';
//alert(soapMessage);
return { url : webServiceURL, data: soapMessage };
}
};
reportObj.hoverMode = 'cell';
reportObj.selectionModel = { type: 'cell' };
reportObj.editModel = {
saveKey: $.ui.keyCode.ENTER,
select: false,
keyUpDown: false,
cellBorderWidth: 0
};
//reportObj.editor = { type: "textbox" };
var reportGrid = jQuery("#grid_contractReport").pqGrid( reportObj );