srini418
02-05-2010, 12:10 AM
Hi,
I am new to ajax , I need to call a REST based webservice using apache cxf. I am using Ajax to call the webservice with a JSON string.
The code that i am using is as follows
$.ajax({
async: false,
type: "POST",
url: iurl,
data: '{"abcdTO":{"term":36,"rate":"0","payment":500,"down":0,"miles":12000}}',
success: function(response)
{
alert(response);
},
error: function()
{
alert('Failure ');
}
});
The server side method for receiving the request is as follows
public AbcdOutputTO fetchModels(
AbcdInputTO abcdTO)
{
}
I am getting the input object as null, am i missing something or doing something wrong (which i am sure). please help me with this.
I am new to ajax , I need to call a REST based webservice using apache cxf. I am using Ajax to call the webservice with a JSON string.
The code that i am using is as follows
$.ajax({
async: false,
type: "POST",
url: iurl,
data: '{"abcdTO":{"term":36,"rate":"0","payment":500,"down":0,"miles":12000}}',
success: function(response)
{
alert(response);
},
error: function()
{
alert('Failure ');
}
});
The server side method for receiving the request is as follows
public AbcdOutputTO fetchModels(
AbcdInputTO abcdTO)
{
}
I am getting the input object as null, am i missing something or doing something wrong (which i am sure). please help me with this.