|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[mule-jira] Created: (MULE-4547) XmlStreamReader to xml fails when contain commentsXmlStreamReader to xml fails when contain comments
-------------------------------------------------- Key: MULE-4547 URL: http://www.mulesource.org/jira/browse/MULE-4547 Project: Mule Issue Type: Bug Components: Transport: CXF / XFire Affects Versions: 2.2.1 Environment: ubuntu 9.04 jdk 1.6 u16 mule 2.2.1ce Reporter: blaise tuffet When working with cxf endpoint configured as proxies, Mule is carrying XmlStreamReaders object. The object is built by cxf and usually read by cxf aswell. Such a stream is not (at the moment) readable more than once so, for multicasting purpose (as an example), user may need to transform it to a duplicable object (dom document or string since xml is the message). When using the XML module to perform this transformation, soap request containing comments (like most of the requests from soapui do) mule will fail throwing a "com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character (NULL, unicode 0) encountered: not valid in any content" exception. A correction in org.mule.module.xml.stax.XMLStreamReaderToContentHandler did solve the problem : from protected void handleComment() throws XMLStreamException { int textLength = staxStreamReader.getTextLength(); int textStart = staxStreamReader.getTextStart(); char[] chars = new char[textLength]; staxStreamReader.getTextCharacters(textStart, chars, 0, textLength); try { filter.comment(chars, 0, textLength); } catch (SAXException e) { throw new XMLStreamException(e); } } changing the getText function to : protected void handleComment() throws XMLStreamException { char[] chars = staxStreamReader.getText().toCharArray(); try { filter.comment(chars, 0, chars.length); } catch (SAXException e) { throw new XMLStreamException(e); } } enables "filter" to write the comment fully. I'm not sure whether the problem came from a bug in the handleComment or in getTextCharacters which could have been loaded in a wrong version by the classloader. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.mulesource.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[mule-jira] Commented: (MULE-4547) XmlStreamReader to xml fails when contain comments[ http://www.mulesource.org/jira/browse/MULE-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32247#action_32247 ] Dirk Olmes commented on MULE-4547: ---------------------------------- 2.2.x: http://fisheye.codehaus.org/changelog/mule/?cs=15938 > XmlStreamReader to xml fails when contain comments > -------------------------------------------------- > > Key: MULE-4547 > URL: http://www.mulesource.org/jira/browse/MULE-4547 > Project: Mule > Issue Type: Bug > Components: Transport: CXF / XFire > Affects Versions: 2.2.1 > Environment: ubuntu 9.04 > jdk 1.6 u16 > mule 2.2.1ce > Reporter: blaise tuffet > Assignee: Daniel Feist > Priority: Major > Fix For: Bug Backlog (2.1.x, 2.2.x) > > > When working with cxf endpoint configured as proxies, Mule is carrying XmlStreamReaders object. The object is built by cxf and usually read by cxf aswell. Such a stream is not (at the moment) readable more than once so, for multicasting purpose (as an example), user may need to transform it to a duplicable object (dom document or string since xml is the message). > When using the XML module to perform this transformation, soap request containing comments (like most of the requests from soapui do) mule will fail throwing a "com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character (NULL, unicode 0) encountered: not valid in any content" exception. > A correction in org.mule.module.xml.stax.XMLStreamReaderToContentHandler did solve the problem : > from > protected void handleComment() throws XMLStreamException > { > int textLength = staxStreamReader.getTextLength(); > int textStart = staxStreamReader.getTextStart(); > char[] chars = new char[textLength]; > staxStreamReader.getTextCharacters(textStart, chars, 0, textLength); > try > { > filter.comment(chars, 0, textLength); > } > catch (SAXException e) > { > throw new XMLStreamException(e); > } > } > changing the getText function to : > protected void handleComment() throws XMLStreamException > { > char[] chars = staxStreamReader.getText().toCharArray(); > > try > { > filter.comment(chars, 0, chars.length); > } > catch (SAXException e) > { > throw new XMLStreamException(e); > } > } > enables "filter" to write the comment fully. > I'm not sure whether the problem came from a bug in the handleComment or in getTextCharacters which could have been loaded in a wrong version by the classloader. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.mulesource.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
[mule-jira] Closed: (MULE-4547) XmlStreamReader to xml fails when contain comments[ http://www.mulesource.org/jira/browse/MULE-4547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dirk Olmes closed MULE-4547. ---------------------------- Resolution: Fixed Fix Version/s: (was: Bug Backlog (2.1.x, 2.2.x)) 3.0.0-M2 2.2.3 (EE only) 3.x: http://fisheye.codehaus.org/changelog/mule/?cs=15954 > XmlStreamReader to xml fails when contain comments > -------------------------------------------------- > > Key: MULE-4547 > URL: http://www.mulesource.org/jira/browse/MULE-4547 > Project: Mule > Issue Type: Bug > Components: Transport: CXF / XFire > Affects Versions: 2.2.1 > Environment: ubuntu 9.04 > jdk 1.6 u16 > mule 2.2.1ce > Reporter: blaise tuffet > Assignee: Dirk Olmes > Priority: Major > Fix For: 2.2.3 (EE only), 3.0.0-M2 > > > When working with cxf endpoint configured as proxies, Mule is carrying XmlStreamReaders object. The object is built by cxf and usually read by cxf aswell. Such a stream is not (at the moment) readable more than once so, for multicasting purpose (as an example), user may need to transform it to a duplicable object (dom document or string since xml is the message). > When using the XML module to perform this transformation, soap request containing comments (like most of the requests from soapui do) mule will fail throwing a "com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character (NULL, unicode 0) encountered: not valid in any content" exception. > A correction in org.mule.module.xml.stax.XMLStreamReaderToContentHandler did solve the problem : > from > protected void handleComment() throws XMLStreamException > { > int textLength = staxStreamReader.getTextLength(); > int textStart = staxStreamReader.getTextStart(); > char[] chars = new char[textLength]; > staxStreamReader.getTextCharacters(textStart, chars, 0, textLength); > try > { > filter.comment(chars, 0, textLength); > } > catch (SAXException e) > { > throw new XMLStreamException(e); > } > } > changing the getText function to : > protected void handleComment() throws XMLStreamException > { > char[] chars = staxStreamReader.getText().toCharArray(); > > try > { > filter.comment(chars, 0, chars.length); > } > catch (SAXException e) > { > throw new XMLStreamException(e); > } > } > enables "filter" to write the comment fully. > I'm not sure whether the problem came from a bug in the handleComment or in getTextCharacters which could have been loaded in a wrong version by the classloader. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.mulesource.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |