users@jaxb.java.net

Re: JAXB conversion of wildcard to DOM (<xjc:dom />) stripping ou t namespace attributes

From: Geis, Matt <Matt.Geis_at_schwab.com>
Date: Thu, 24 Jul 2003 09:40:04 -0700

>> If you could go one step further and turn off unmarshal-time validation?

When I turn off validation during unmarshalling, I get the following
exception.

org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or
change an object in a way which is incorrect with regard to namespaces.
        at org.apache.xerces.dom.AttrNSImpl.setName(AttrNSImpl.java:141)
        at org.apache.xerces.dom.AttrNSImpl.<init>(AttrNSImpl.java:110)
        at
org.apache.xerces.dom.CoreDocumentImpl.createAttributeNS(CoreDocumentImpl.ja
va:1791)
        at
org.apache.xerces.dom.ElementImpl.setAttributeNS(ElementImpl.java:660)
        at
com.sun.xml.bind.marshaller.SAX2DOMEx.startElement(SAX2DOMEx.java:112)
        at
schwab.rrbus.export.generated.impl.runtime.UnmarshallingEventHandlerAdaptor.
enterElement(UnmarshallingEventHandlerAdaptor.java:71)
        at
schwab.rrbus.export.generated.impl.runtime.W3CDOMUnmarshallingEventHandler.e
nterElement(W3CDOMUnmarshallingEventHandler.java:42)
        at
schwab.rrbus.export.generated.impl.WsdlImpl$Unmarshaller.enterElement(WsdlIm
pl.java:141)
        at
schwab.rrbus.export.generated.impl.runtime.AbstractUnmarshallingEventHandler
Impl.spawnChildFromEnterElement(AbstractUnmarshallingEventHandlerImpl.java:2
23)
        at
schwab.rrbus.export.generated.impl.ServiceImpl$Unmarshaller.enterElement(Ser
viceImpl.java:444)
        at
schwab.rrbus.export.generated.impl.runtime.SAXUnmarshallerHandlerImpl.startE
lement(SAXUnmarshallerHandlerImpl.java:133)
        at
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:446)
        at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocume
ntScannerImpl.java:306)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1543)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:348)
        at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:539)
        at
org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:595)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:112
5)
        at
schwab.rrbus.export.generated.impl.runtime.UnmarshallerImpl.unmarshal(Unmars
hallerImpl.java:142)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshall
erImpl.java:114)
        at
javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshall
erImpl.java:97)
        at TestServiceImport.main(TestServiceImport.java:71)