users@jersey.java.net

Re: [Jersey] XmlTransient annotation not working

From: Chris Carrier <ctcarrier_at_gmail.com>
Date: Fri, 23 Apr 2010 09:10:03 -0700

What are you annotating? I believe by default you need to annotate
the getter not the property itself. I've used this with Jersey a
bunch and it seems to work by default.

Chris

On Fri, Apr 23, 2010 at 1:57 AM, Tatu Saloranta <tsaloranta_at_gmail.com> wrote:
> On Fri, Apr 23, 2010 at 1:27 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>>
>> On Apr 23, 2010, at 9:16 AM, Jakub Podlesak wrote:
>>
>>>
>>> For JAXB based processors, that would be a bug. Do you see the property
>>> generated also for XML output?
>>>
>>> Otherwise, if you are using the Jackson based procesor,
>>> (just looking at the Jackson javadocs),
>>> there should be a @JsonIgnore annotation available
>>> for this purpose i guess.
>>>
>>
>> I think Jackson supports some of the JAXB annotations, @XmlTransient might
>> be one of them.
>
> Yes, the only trick is that you have to explicitly add the call to
> enable handling of these (see Jackson FAQ for how to do this); default
> is to only check for Jackson annotations (why? mostly just to keep
> dependency to jax-rs api optional)
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>