Posted by sekhar
on February 14, 2005 at 12:06 PM PST
This request is from firstname.lastname@example.org on jaxb interest list email@example.com . My comments are interleaved with the original email.
Orginal request - I've been reading through the specification a bit and also playing around with the JAXB 2.0 early release and I just had a few questions in general.
1. It seems that the specification is still mostly making references to interfaces, implementations, etc. which are no longer used in JAXB 2.0 as far as I can tell from playing around with the implementation. Is there a more recent specification than the Early Draft Release from July 2004?
A later draft version of JAXB 2.0 is currently being worked on in the JAXB 2.0 Expert Group. This version will be made available along with the Early Access Version of the RI.
With respect to the question on interfaces. Interfaces are indeed supported; they are just not the default. JAXB 2.0 also supports the binding of schema components to value classes.
By default schema components are bound to value classes.
To bind to interfaces, the generateValueClass must be set to "false" e.g.
Original Request 2. The JAXB compiler now generates POJOs (for all intents and purposes) that contain a bunch of annotations. The annotations seem to be what drives everything. What support will there be for using custom classes and enums rather than JAXB generated classes? It appears that if I annotate my classes and write a custom binding file I don't really need to use any JAXB generated classes, but I'm still forced to use the generated enums. Does that seem correct?
JAXB 2.0 annotation architecture is very much annotation driven. A major goal of JAXB 2.0 is mapping of POJO to XML. So you can start from Java with your own custom classes (instead of XML schema) and generate a schema or XML representation. Annotations can be used your own custom classes to customize the generated schema or the XML representation.
Original Request 3. The JAXB compiler is using annotations and classes that aren't in the javadoc, is there an update on that at all?
The published javadoc is an Early Access Draft Version 0.40. An updated version of javadoc will be available very soon.
Sekhar Vajjhala Sun Microsystems