cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Re: Globally register XMLAdapters.
Date Tue, 08 Oct 2013 10:39:49 GMT
On 08/10/13 01:56, Osvaldo Pina wrote:
>   Thanks! I was asking that because I have a scenario where the jaxb
> annotated classes are loaded by one classloader and the package annotations
> are loaded by its parent classloader. When the annotation reader
> (RuntimeInlineAnnotationReader) tries to get the package annotation it is
> not visible. If there was any way of registering XMLAdapters I would use
> that. Now I’m trying to solved that by registering my own
> RuntimeInlineAnnotationReader which tries to get the annotation the default
> way and in case it is not find tries again using the thread current
> classloader. The problem is how to set the jaxb context property. I created
> a subclass of JAXBElementProvider that sets the property in its
> constructor. It worked ok but I was wondering if there is any way of
> setting the jaxb properties using JAXRSClientFactoryBean programmatically.
JAXBElementProvider has a map "contextProperties" property, perhaps it 
can help ? May be using JAX-RS ContextResolver is another option ?

Cheers, Sergey

> On Thu, Oct 3, 2013 at 8:06 AM, Sergey Beryozkin <>wrote:
>> Hi
>> On 02/10/13 15:53, Osvaldo Pina wrote:
>>> Hi All,
>>>    I'm using cxf 2.6.7 for jaxrs services and I would like to know if there
>>> is any way of registering XMLAdapters for the whole environment instead of
>>> annotating classes or packages.
>> I thought that registering them in a package would offer a max coverage,
>> may be it is possible to set them in a base package and effectively
>> inherited by subpackages, not really sure
>> Cheers, Sergey
>>>    Ats,
>>> Osvaldo Pina.

View raw message