Dear all,
Consider the following XML example:
<?xml version="1.0"?>
<definitions name="NameOfDefinition">
<MappingType name="test_One"></MappingType>
<MappingType name="test_Two"</MappingType>
<MappingType name="test_Three"</MappingType>
</definitions>
After using the tool "org.exolab.castor.xml.schema.util.XMLInstance2Schema" on the
example, we get an XML Schema and, and using the Source Generator we get some Java
classes (worderful work!).
At this stage, I have a "strange" problem when I try to unmarshal that file into the
appropriate class. NO ERROR is shown so I supposed everything was alright, however the
"MappingType" tags are never unmarshalled in to the internal vector (ie. only the
'name'). I re-check all definitions and all the code seems to be ok, but it is not. I
changed the name of the tag removing the "Type" part, and it seems to work, but since
the XML definition is provided by a third party I am unable to change the
specification.
This is the command I use to generate the classes:
>java org.exolab.castor.xml.schema.util.XMLInstance2Schema test.xml test.xsd
>java org.exolab.castor.builder.SourceGenerator -i wsdl.xsd -package myapp -nodesc
This is the code used for the unmarshal
. . .
StringReader reader = new StringReader(xml_file);
Definitions d = new Definitions();
d = d.unmarshalDefinitions(reader);
. . .
StringWriter writer = new StringWriter();
d.marshal(writer);
System.out.println(writer.toString());
Thanks for your collaboration on this issue,
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev