users@jersey.java.net

Re: [Jersey] problems marshaling xml

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Wed, 15 Apr 2009 11:24:31 +0200

as I commented in the previous email, the problem at the end was the
incompatibility between JPA and JAXb annotations, so.. it will not be
fixed in the Jersey side..

Jersey suffer from this issue, since it provides transparent
serialization mechanism that will return non-JPA objects :(

so, despite the beauty of Jersey, we still have the impedance between
the JAXB elements and the JPA entities.. a mess :(

On Wed, Apr 15, 2009 at 10:23 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
> On Apr 14, 2009, at 6:04 PM, Felipe Gaúcho wrote:
>
>> I have a strange situation here.. I created the types of my project
>> and I am able to use it through the Jersey resources.. everything
>> works fine..
>>
>> But I can't marshal and unmarshal the same types with plain JAXB :(
>>
>
> How are you creating JAXBContext ?
>
>
>> I am curious about what jersey uses automagically to convert objects
>> in XML and also to find out what I am missing in my test
>> cases..........
>>
>
>
> If you have not defined an implementation ContextResolver<JAXBContext> to
> return an instance of JAXBContext for your JAXB types then Jersey will
> create a JAXBContext from the class to marshall or unmarshall, for example:
>
>  Class c = ...
>  JAXBContext jc =  JAXBContext.newInstance(c);
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>



-- 
Please help to test this application:
http://fgaucho.dyndns.org:8080/cejug-classifieds-richfaces