On Fri, Mar 18, 2011 at 3:03 AM, Martin Matula <martin.matula_at_oracle.com> wrote:
> Jersey does not know how to deserialize your bean from a plain text request
> - you have to implement that logic yourself by writing your own
> MessageBodyReader that takes a stream of plain text and constructs FooBean
> from it. Then it will work as you expect.
This is correct if considering method as presented, but I think in
original idea was he want to offer two endpoints, but for some reason
tried rolling them into a single method (i.e. idea is to either take a
String, or a structured data to bind as POJO).
I think Jakub's example would solve this.
-+ Tatu +-