users@jaxb.java.net

Question Regarding Complex Types

From: Robert Greene <rgreene_at_versant.com>
Date: Sun, 12 Jan 2003 12:27:44 -0800

Hi all,

I am not happy about the fact that JAXB creates two interfaces for a
complex type which then manifests themselves in two concrete classes
forcing an inheritance hierarchy on my model? Does anyone know if there
is there a way to generate only one class that implements both
interfaces? If I can implement both interfaces in a single class, then
I will not be forced into an inheritance model, then I can use the JAXB
annotation mechanism to map to an existing class.

I am looking at this from the perspective that I have a model defined in
UML via Rose and then I autogenerate the code for the model. This is
all within my control. What is not in my control is the format for data
coming to me in XML from many sources. I can of course use
transformations to get the XML in different forms into a consistent
representation of XML for my existing model, but then when I take that
consistent form and try to generate the Java classes, they need to
conform to my existing model. If I cannot control the inheritance
hierarchy then this last step will be impossible.

Does anyone know how to work around this issue? Is Sun planning to
change this for the final release?

Thanks,
-Robert

--
Robert Charles Greene
Versant Corporation
Director, Systems Engineering
Office:  (510) 789-1627
Cell:   (510) 207-5783