You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Avner Levy <av...@live.com> on 2012/04/22 08:58:47 UTC

Alternatives to @XmlSeeAlso

Hi,
I have a server exposing multiple web services.
The objects of the services are scattered in several packages and include
cross packages inheritance.
>From my understanding if you have inheritance and a service can return a
number of possible sub classes you need to use the @XmlSeeAlso on the base
class which adds unnecessary dependencies and complexity.
For both performance and dynamic configuration reasons I want to create
myself the JAXB context which will be used by the CXF client / server
services.
This way I can avoid the unnecessary dependencies and manage the context
myself. I prefer specifying it once on the bus level, but if that isn't
possible I guess controlling it on the service level will be good enough.
Any ideas will be appreciated.
Thanks in advance,
Avner

--
View this message in context: http://cxf.547215.n5.nabble.com/Alternatives-to-XmlSeeAlso-tp5657103p5657103.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Alternatives to @XmlSeeAlso

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 22/04/12 07:58, Avner Levy wrote:
> Hi,
> I have a server exposing multiple web services.
> The objects of the services are scattered in several packages and include
> cross packages inheritance.
>  From my understanding if you have inheritance and a service can return a
> number of possible sub classes you need to use the @XmlSeeAlso on the base
> class which adds unnecessary dependencies and complexity.
> For both performance and dynamic configuration reasons I want to create
> myself the JAXB context which will be used by the CXF client / server
> services.
> This way I can avoid the unnecessary dependencies and manage the context
> myself. I prefer specifying it once on the bus level, but if that isn't
> possible I guess controlling it on the service level will be good enough.
> Any ideas will be appreciated.

CXF JAXBBinding offers an extraClasses property, so that can be used to 
avoid adding @XmlSeeAlso,

HTH, Sergey

> Thanks in advance,
> Avner
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Alternatives-to-XmlSeeAlso-tp5657103p5657103.html
> Sent from the cxf-user mailing list archive at Nabble.com.