Hi Sergey, 

Thank you for your reply, that works very good.
Do you know please if there is a similar configuration in Spring for JAXWS in 
order to marshall/unmarshall as JAXBElements?
I tried to create an ObjectFactory class with JAXBElements methods but that 
does not work.

Kind regards,
Diana 


On 9 mars 2014, at 22:45, Sergey Beryozkin wrote:

> Hi Diana
> 
> JSONProvider can be configured to read into beans without XmlRootElement, set 
> its unmarshallAsJaxbElement property to true, the runtime checks the 
> adapters, this is independent of the actual providers
> being used
> 
> Cheers, Sergey
> 
> 
> On 07/03/14 21:47, allam-di14 wrote:
>> Hello Sergey,
>> 
>> As a continuation to this discussion, I would like to know please if there
>> is a JSON provider in cxf which :
>> 1) works without adding @XmlRootElement on classes
>> 2) allows using @XmlJavaTypeAdapter JAXB annotation for handling interfaces,
>> ex:
>> public void op(
>>              @XmlJavaTypeAdapter(InterfaceAdapter.class)
>>              ResourceInterface r);
>> 
>> 
>> 
>> I tried org.apache.cxf.jaxrs.provider.json.JSONProvider, but it requires
>> adding  @XmlRootElement on classes. I tried also
>> org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider, which works without
>> adding
>> @XmlRootElement, but it didn't treat the @XmlJavaTypeAdapter.
>> 
>> Could I have an idea please how to use my adapter class (InterfaceAdapter)
>> with JAX-RS for JSON?
>> 
>> Kind regards,
>> Diana
>> 
>> 
>> 
>> --
>> View this message in context: 
>> http://cxf.547215.n5.nabble.com/XmlRootElement-with-jax-rs-jax-ws-tp566400p5740975.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>> 
> 
> 
> -- 
> Sergey Beryozkin
> 
> Talend Community Coders
> http://coders.talend.com/
> 
> Blog: http://sberyozkin.blogspot.com
> 

Reply via email to