In that case - you can use FormMultivaluedMapProvider (present in jersey
core).
Try do something like:
@POST
@Path("theService")
@Consumes("application/x-www-form-urlencoded")
public String theService(MultivaluedMap<String, String> formData)
throws Exception
{
System.out.println("### " +formData.getFirst("schema"));
return ...
}
Regards,
Pavel
On 5/4/11 2:56 PM, Anoop R wrote:
> Hi Pavel,
>
> This worked. Thank you very much.
>
> I am wondering if it is really required to use "multipart/form-data"
> as the form enctype as I am not expecting big chunk of data (like a
> whole file). Will it be possible to go with
> "application/x-www-form-urlencoded" itself and still read form data as
> a list/map?
>
> Thanks,
> Anoop