|
Hi, I have generated the classes (and Descriptors) for my big
schema with Source Generator. When I try to unmarshall an XML doc I get the
following error: unable to find or create a
ClassDescriptor for class: OTA_PingRQ Caused by: org.xml.sax.SAXException:
The class for the root element 'OTA_PingRQ' could not be found.
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1505) Since I have several potential XML documents and I do not
know the class to unmarshall it, I am using:
Unmarshaller um = new Unmarshaller();
um.addNamespaceToPackageMapping(
"http://www.opentravel.org/OTA/2003/05",
"ota");
OTA_PingRQ p = (OTA_PingRQ) um.unmarshal(new
FileReader("pingrq.xml")); I am doing something wrong? Do I have to generate an XML mapping file? Is there an
automatic way of generating the mapping file form the Descriptor classes? -- Pablo |

