users@jaxb.java.net

JAXB newbie questions

From: David Hoffer <dhoffer_at_michwave.com>
Date: Mon, 26 Nov 2007 19:05:10 -0500

I am relatively new to JAXB/XSD but am having some problems, I am hoping
someone can help with.

What I am trying to do is auto-generate an 'easy' to use SDK API for an XML
document format we wish to standardize on. I am using XSD to specify the
XML content & structure and of course, JAXB to generate the Java classes.

Here are some of the problems:

1. JAXB doesn't generate any interfaces only concrete objects. However the
docs seem to say that everything should have an interface (and this is what
I want).

2. The concrete objects JAXB generates aren't very smart, they are JavaBeans
only. I would expect a factory or at least constructors that can take all
the required parameters plus optional.

3. If I have reusable elements in the XML, I would like to reference these
without the Java API user having to set ID/IDREF. I don't see a way to do
this. I want all XML constructs such as these shielded from the Java user.
How can I do this? Using JAXB, is it possible to have java objects that
reference other java objects, serialize these to XML, unserialize back to
java objects, and have all the references intact?

Thanks much for any help with these questions!

-Dave

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.503 / Virus Database: 269.16.7/1152 - Release Date: 11/26/2007
10:50 AM