users@jaxb.java.net

XmlJavaTypeAdapter issue

From: Dan Diephouse <dan_at_envoisolutions.com>
Date: Wed, 27 Sep 2006 18:22:38 -0400

Hiya,

I'm trying to get my XmlJavaTypeAdapter on an interface to work with the
code first approach. I'm wondering, should I be specifying the interface
or type class to jaxb. Let me try to explain the two areas... I have an
interface Customer and an implementation CustomerImpl. In my jaxb.index
- should I put Customer there or CustomerImpl? Also when I do:

new JAXBElement(qname, class, object);

Should my class be Customer or CustomerImpl? I tried Customer but JAXB
complains that its an interface. I tried CustomerImpl, but JAXB is
serializing it wrong - its using the namespace from the qname on all the
child elements (i.e. customer.name, customeraddress) instead of using
the package generated namespace.

Thoughts?

- Dan

-- 
Dan Diephouse
Envoi Solutions
http://envoisolutions.com
http://netzooid.com/blog