Is there a way for to specify a namespace-to-package mapping for tags the
same way you can use unmarshaller.addNamespaceToPackageMapping() for
xsi:types?
I want to be able to specify the mapping that way when castor sees a tag
with a namespace, it will know exactly what package to look for that class
in. I know I can do this with a mapping file, but then I would have to have
to do this for every single tag that needs the namespace resolution. The
schema I am working with is extremely large, so this really isn't an option.
i.e.
<engine>
<ns1:processor>
<name>p1</name>
</ns1:processor>
<engine>
Is there a way for castor to see ns1 and map that to a package for any tag?
Actually it would almost be good enough if I could tell castor to ignore the
namespace. Is that possible? Currently, it sees ns1:processor and gives me
a NullPointerException probably because it can't find the processor field
using introspection?
java.lang.NullPointerException
at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:14
10)
at
org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:11
49)
at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java:1284)
at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1171)
at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:583)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:491)
at
com.liaison.uccnet.castor.polymorphism.MappingEngine.unmarshal(MappingEngine
.java:53)
at
com.liaison.uccnet.castor.polymorphism.MappingEngine.main(MappingEngine.java
:129)
Thanks!
--
Jesse Shieh
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user