Take a look at
https://github.com/gsapountzis/jersey-binding/
The above is a "native" jersey binder in the sense that it uses jersey
for bean introspection and string conversion. You could also use
BeanUtils, Spring DataBinder, or an EL, etc for binding.
regards,
George
On Wed, Nov 2, 2011 at 8:45 PM, Jason Erickson <jason_at_jasonerickson.com> wrote:
> What I would like to do is something like this:
>
> @POST
> @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
> public void submitPerson(Person person) {
> personDao.save(person);
> }
>
>
> There might be more to it, but that's the gist. I tried to write a MessageBodyReader<Person> that consumes application/x-www-form-urlencoded, but the readFrom method simply takes an InputStream. I was going to transform that into a MultivaluedMap<String, String> but that's turning out not to be very straightforward for me (I can't instantiate my own). Is there something I'm missing? Do I just have to get down to the nuts and bolts of reading the InputStream and constructing my own map?
>
>