Skip to Content

Ajax post

Hi All,

I am trying to use Ajax post to get xacute query output in xml format. Thing is its not overriding the parameters assigned. It always gives defaulted output from static input provided in xacute query.

Please see the code snippet below.

function getXmlData(startDate,endDate,shiftVal,vMachType,MachID,MachGroup,vPlantId)

{

var urlPath="http://IP:port/XMII/Illuminator?QueryTemplate=/XaqCalcChartData&Content-Type=text/xml";

$.ajax({

type : "POST",

url : urlPath,

datatype : "xml",

data:

{

Param1:startDate,

Param2:endDate,

Param3:shiftVal,

Param4:vMachType,

Param5:MachID,

Param6:MachGroup,

Param7:vPlantId

},

async: false,

beforeSend: function()

{

},

error: function()

{

alert('Error');

},

success: function(xml)

{

alert(xml);

......

........

Can anyone help me on this.

Thanks,

Padma

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 29, 2013 at 08:42 PM

    I think parameters passed with the data property are put in the post document body while the MII service is looking for them only in the URL parameters (e.g "<url>?&Param.1=x&Param.2=y" etc.. ).

    Add comment
    10|10000 characters needed characters exceeded