users@jersey.java.net

RE: [Jersey] Unable to serialize (JAXB) when returning Response instead of actual object types

From: Jeremy Whitlock <jwhitlock_at_collab.net>
Date: Fri, 14 Nov 2008 13:56:12 -0800

> I'll bet you are running into an "interesting" detail about JAXB that
> also bit me.
>
> I generate my JAXB classes from a schema with embedded JAXB annotation
> stuff, and (to make a long story short), JAXB does *not* generate a
> @XmlRootElement annotiation (I *think* that's the right one). Without
> this annotation, JAXB has no way to know what "outer" element to use
> around your list.

But I have that annotation on my objects. With the @XmlRootElement
annotation on a class, JAXB should be able to do this but it has
problems. That is of course unless I misunderstand what you're saying.