MyThing is an entity class and is annotated with the required JPA annotations
like:
@Entity
@Table(name = "my_thing")
@NamedQueries(...)
public class MyThing {
...
}
Should the JPA annotations matter here because this seems to be an issue in
the handling of Converter (JAXB) annotations...
Erdinc Yilmazel wrote:
>
> How is your MyThing class annotated?
>
> On Sat, Mar 14, 2009 at 2:22 AM, Gautam Arora <gautamsarora_at_gatech.edu>
> wrote:
>>
>> Hi,
>> I have a Converter structure similar to....
>>
>> @XmlRootElement(name = "things")
>> public class MyThingsConverter {
>> private Collection<MyThing> entities;
>> private Collection<MyThingConverter> items;
>> .....
>> }
>>
>> @XmlRootElement(name = "thing")
>> public class MyThingConverter {
>> private MyThing entity;
>> ...
>> }
>>
>> now when i get a response using MyThingsConverter (by returning an object
>> of
>> it), my response looks like:
>> <things>
>> <MyThing>
>> ....
>> </MyThing>
>> </things>
>>
>> whereas I am expecting it to be:
>> <things>
>> <thing>
>> ....
>> </thing>
>> </things>
>>
>> so it seems that the MyThingsConverter is not properly picking up the
>> correct XmlRootElement for thing which is defined by me as thing and
>> going
>> with the default class name of MyThing.
>>
>> When I just try to get a reponse from MyThingConverter, I get
>> <thing>
>> ...
>> </thing>
>>
>> So, the problem seems to be when MyThingsConverter contains a list
>> MyThingConverter.
>>
>> Any flag/setting that I need to enable in such a case?
>>
>> Thanks,
>> Gautam
>> --
>> View this message in context:
>> http://n2.nabble.com/Converter-list-problem-tp2476841p2476841.html
>> Sent from the Jersey mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
>
--
View this message in context: http://n2.nabble.com/Converter-list-problem-tp2476841p2476981.html
Sent from the Jersey mailing list archive at Nabble.com.