[ 
https://issues.apache.org/jira/browse/CXF-2340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12733618#action_12733618
 ] 

Daniel Kulp commented on CXF-2340:
----------------------------------


Interesting.   This sound like it might be a bug in the Xerces validator then.  
 You MAY want to try grabbing whatever the latest  version of Xerces is and 
trying to reproduce it with that.   Log a bug with them and attach your test 
case if it does.    (much of the parser/validation stuff in the JDK is 
repackaged Xerces stuff)

In either case, it's not something we can work around.   JAXB MIGHT be able to 
work around it (since they know when they are reading a qname and might be able 
to munge things a bit when doing so), but it does sound like a validator issue. 


> Unmarshalling Error: UndeclaredPrefix: Cannot resolve 'ns0:Xxx' as a QName: 
> the prefix 'ns0' is not declared 
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2340
>                 URL: https://issues.apache.org/jira/browse/CXF-2340
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.2.2
>            Reporter: John Pfeifer IV
>         Attachments: cxf-test.tar, StreamReaderProblem.zip
>
>
> Please see the following thread from Nabble outlining the issue.  I have 
> sample code that can be used to test the scenario.
> http://www.nabble.com/Unmarshalling-Error%3A-UndeclaredPrefix%3A-Cannot-resolve-%27ns0%3AXxx%27-as-a-QName%3A-the-prefix-%27ns0%27-is-not-declared-to17918441.html#a24462568
> Basically, when specifying an xsi:type for an element that extends and 
> Complex Type, CXF throws the following error
> [org.xml.sax.SAXParseException: UndeclaredPrefix: Cannot resolve 
> 'ser:getSedans' as a QName: the prefix 'ser' is not declared.]
>       at 
> com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:396)
>       at 
> com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:335)
>       at 
> com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:312)
>       at 
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:607)
>       ... 29 more
> Caused by: org.xml.sax.SAXParseException: UndeclaredPrefix: Cannot resolve 
> 'ser:getSedans' as a QName: the prefix 'ser' is not declared.
>       at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
>       at 
> com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:131)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:384)
>       at 
> com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:318)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:410)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3165)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.getAndCheckXsiType(XMLSchemaValidator.java:2435)
>       at 
> com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1922)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to