With JAXB2, you could write a XJC plugin that made your classes
implement your own interfaces or extend your own classes, to make them
conform to your version-neutral type interface. With JAXB1, though, I
don't know if there's a way to achieve the same thing.
Christophe Alexandre wrote:
> Hi all,
> I'm using JAXB 1.5 and I'm looking for feedback on how to manage
> different JAXB classes generated from several .xsd versions.
>
> My main problem is that I must manage a huge .xsd schema and that I must
> manage at the same time several versions of it. I also know that in the
> future I will have new versions
> of this schema.
> There are differences between the different versions but the heart of
> the schema remains the same.
> So I created a set of abstract classes and I have edited the JAXB
> classes to make them extend these abstract classes.
> This permits me to declare abstract methods in my abstract classes,
> which I know are implemented by the JAXB classes.
>
> Maybe, I'm not very clear here, but this permits me to keep the heart of
> my system without loosing it each time I regenerate new JAXB classes
> and to develop functions on top of my system independent of the version.
>
> Is this an heresy ?
> Is there a way I can make some of the generated JAXB classes extend
> automatically my classes during the generation ?
> Is this kind of mechanism possible with JAXB 2.1 ?
> Did someone face the same kind of problematic ?
>
> Thanks for any feedback...
>
> Regards.
> Christophe
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>