cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sebastien chatel (JIRA)" <>
Subject [jira] Created: (CXF-2829) W3CDOMStreamReader is not compatible with wstx XMLEventReader
Date Thu, 27 May 2010 12:44:28 GMT
W3CDOMStreamReader is not compatible with wstx XMLEventReader

                 Key: CXF-2829
             Project: CXF
          Issue Type: Bug
          Components: Core
    Affects Versions: 2.2.8
         Environment: Mule 2.2.6-snapshot in proxy mode, and WS-Security (wss4j)
WSTX 4.0.8
            Reporter: sebastien chatel
            Priority: Minor

If you create an XMLEventReader from a W3CDOMStreamReader (with the woodstox library), it
will fail because XMLEventAllocator doesnt accept Attribute XMLEvent :

Caused by: com.ctc.wstx.exc.WstxException: Internal error: should not get [13]
	at com.ctc.wstx.evt.DefaultEventAllocator.allocate(
	at org.codehaus.stax2.ri.Stax2EventReaderImpl.createNextEvent(
	at org.codehaus.stax2.ri.Stax2EventReaderImpl.nextEvent(

Here is the comment in wstx source code :

            /* Following 2 types should never get in here; they are directly
             * handled by the reader, and can only be accessed via start
             * element.
        case NAMESPACE:
        case ATTRIBUTE:
            throw new WstxException("Internal error: should not get "

To create a XMLStreamReader from a DOM Document or Node, i recommand to simply use XMLInputFactory.createStreamReader(source),
where source is a DOMSource.

I think it's better to rely on stax implementation to create a StreamReader from a DOM Node.

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

View raw message