I'm sorry if this is clearly documented somewhere but I'm just too
stressed out to see it.
I am using the XML source generator with a mapping binding file using
defaultBindingType="type".
My schema declares the root element as
<xsd:element name="foo" type="fooType"/>
When marshalling an instance of the generated FooType class with
Marshaller.marshal(), the name of the root element is <fooType> while I
need it to be <foo>.
I tried adding an explicit elementBinding to my mapping binding file, to
get a class for the element:
<elementBinding name="/foo">
<java-class name="bar.baz.Foo" />
</cbf:elementBinding>
This didn't have any effect at all. I assume the elementBinding cannot
be used in combination with defaultBindingType="type"?
I cannot use Marshaller.setRootElement() since the example above is a
bit simplified. The FooType instance is actually added as an AnyObject
in an outer schema hierachy which is then Marshalled.
So what is the best/easiest way to solve this???
Can I add a new class-descriptor mapping to the Marshaller before
marshal:ing?
Thanks in advance,
/Mattias
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email