kavita
2011-12-06 07:37:55 UTC
Hi,
I have a REST web service to which I am sending multipart form data. Since
Glassfish 3.1 uses jdk7, I had to change the @FormParam to @FormDataParam in
the webservice method signature. Doing this causes all the requests to my
web service ending up as Bad Request errors.
I am using an ajax request to call the web service. This is the call:
var formdata = new FormData();
formdata.append("purpose","new");
formdata.append("filename",workbook);
formdata.append("username","abc");
formdata.append("password","abc");
formdata.append("company","Third");
$.ajax({
url:'http://comp1:8080/RestWSGS/jersey/GetJson',
async: false,
data:formdata,
type: 'POST',
cache: false,
dataType: 'json',
contentType: "multipart/form-data",
processData: false,
success: function(data)
{
myData=data;
alert("myData" + myData);
}
});
Please let me know how can I ask jersey to convert the FormData object to
the ***@FormDataParam.
Thanks for any help you can provide!!
Kavita
--
View this message in context: http://jersey.576304.n2.nabble.com/FormDataParam-gives-Bad-Request-tp7065882p7065882.html
Sent from the Jersey mailing list archive at Nabble.com.
I have a REST web service to which I am sending multipart form data. Since
Glassfish 3.1 uses jdk7, I had to change the @FormParam to @FormDataParam in
the webservice method signature. Doing this causes all the requests to my
web service ending up as Bad Request errors.
I am using an ajax request to call the web service. This is the call:
var formdata = new FormData();
formdata.append("purpose","new");
formdata.append("filename",workbook);
formdata.append("username","abc");
formdata.append("password","abc");
formdata.append("company","Third");
$.ajax({
url:'http://comp1:8080/RestWSGS/jersey/GetJson',
async: false,
data:formdata,
type: 'POST',
cache: false,
dataType: 'json',
contentType: "multipart/form-data",
processData: false,
success: function(data)
{
myData=data;
alert("myData" + myData);
}
});
Please let me know how can I ask jersey to convert the FormData object to
the ***@FormDataParam.
Thanks for any help you can provide!!
Kavita
--
View this message in context: http://jersey.576304.n2.nabble.com/FormDataParam-gives-Bad-Request-tp7065882p7065882.html
Sent from the Jersey mailing list archive at Nabble.com.