I am working with some JAXB generated classes from 2 separate packages. I
am trying to create an JAXBObject and then marshal it, and have run into
some problems in doing so.
Following one path I get an org.w3c.dom.DOMException with the message
"DOM006 Hierarchary Request Error". The way that generates the exception
involves setting the JAXBContext, and then using the ObjectFactory for the
object I want to create (e.g. almost exactly like the create-marshal
example, with the exception that I have 2 separate ObjectFactory's for the
separate packages).
The way that works, but is adding extra overhead, is to create an XML
string for the type of object I have, unmarshal it, and then work with the
created object to set what I need to on it. Now obviously this adds the
extra of doing an unnecessary unmarshalling, but it does work.
Can anyone explain to me why doing the unmarshalling first to create the
object, instead of using the ObjectFactory methods, would give allow me to
marshall succesfully? Perhaps there are some properties that need to be
set?
I suspect it has something to do with the two separate package names and
the objects in each, as I created a simple example of my own, using only
one package and it worked fine.
Any help greatly appreciated.
Thanks,
Greg T. Robertson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net