[ https://issues.apache.org/jira/browse/CXF-2340?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763072#action_12763072 ]
John Pfeifer IV commented on CXF-2340: -------------------------------------- Looks like this was fixed in JAXB, do you have a CXF target release number? > 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 > Components: JAXB Databinding > 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.