cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Getting extra schemas into JAXB/JAXWS with spring
Date Fri, 04 Jan 2008 22:53:45 GMT

On Sunday 23 December 2007, Benson Margulies wrote:
> I ran wsdl2js for a service that includes an 'extra' schema whose only
> purpose in life is to contain elements for use with xs:any.
> When I then turn around and deploy, the extra schema falls out of the
> service model.
> There must be some way to use the ObjectFactory class for the extra
> schema to get it into the picture at runtime. Clue?

There are several ways to do it.   On trunk (jax-ws 2.1), it's much 
easier as you can add an @XmlSeeAlso annotation to your service to have 
it SeeAlso any class in the other package.   The JAXB databinding will 
automatically grab the ObjectFactory from any package for any class 
referenced with the SeeAlso.

For 2.0.x, it's a bit trickier.   There is a 
jaxb.additionalContextClasses key that can be set in the properties that 
points to an array of classes or something like that that can be used to 
provide additional stuff for jaxb.   See the file:


for an example.

J. Daniel Kulp
Principal Engineer, IONA

View raw message