users@jaxb.java.net

Re: Abstract Types and Separate Compilation Times

From: Kenny MacLeod <kenny.macleod_at_kizoom.com>
Date: Mon, 9 Feb 2009 17:57:44 +0000

Are you using the xjc:simple binding customisation? That does things
like collapsing extendable types down to concrete references.

Jamie Johnson wrote:
> I am running into an issue where I have created several XSDs, xsd 1 has
> an abstract type defined, xsd 2 implements the xsd (it is important to
> note that xsd 1 has no implementations of the abstract type). If I
> compile these schemas together I get the expected result in that the
> Java created has a method of the form.
>
> setGeometry(JAXBElement<? extends GeometryBaseType>)
>
> but if I compile them separately the method looks like
>
> setGeometry(GeometryBaseType)
>
> which does not allow me to properly use the object generated in xsd 2.
> Short of compiling everything together, how can I have this method
> generated appropriately?