users@jersey.java.net

Re: [Jersey] passing in JSON to create a resource

From: Kevin Duffey <andjarnic_at_yahoo.com>
Date: Thu, 30 Jul 2009 09:34:02 -0700 (PDT)

Did you make sure your request has the proper method and content-type headers to match the POST and application/xml your method is looking for?



________________________________
From: Jesus M. Rodriguez <jmrodri_at_nc.rr.com>
To: users_at_jersey.dev.java.net
Sent: Thursday, July 30, 2009 5:45:35 AM
Subject: Re: [Jersey] passing in JSON to create a resource

Kevin,

On Thu, Jul 30, 2009 at 1:33 AM, Kevin Duffey<andjarnic_at_yahoo.com> wrote:
> Jesus,
>
> Take a look at using Jersey with JAXB. It allows you to easily handle json
> and xml being turned into your domain object and vice versa.

I've got JAXB generating JSON in Jersey for returned objects quite nicely.
But when I have my client POST json to the resource, I get a
'java.lang.Error: Error: could not match input' error.

http://pastie.org/565210

So it's saying it doesn't know how to transform my JSON into the specified
object. And I can't find documentation that can clue me into what I'm
doing wrong.

jesus

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net