[teiid-issues] [JBoss JIRA] (TEIID-2757) XML reserved characters not support in Odata

Steven Hawkins (JIRA) jira-events at lists.jboss.org
Thu Dec 5 13:31:05 EST 2013


    [ https://issues.jboss.org/browse/TEIID-2757?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12929023#comment-12929023 ] 

Steven Hawkins commented on TEIID-2757:
---------------------------------------

For the Atom feed odata4j eventually uses StaxXMLWriter2 which hard codes the xml version to 1.0.   Just to confirm that not only are raw characters such as these not valid in xml 1.0, but escaping them is also not valid from http://www.w3.org/TR/REC-xml/#NT-Char

Based upon http://jira.codehaus.org/browse/WSTX-293 (which requests to ignore the stream check for xml 1.0 invalid chars) - this is something that they are aware.  I locally also see this occurring in the woodstox BufferingXmlWriter which has a similar check with the open issue http://jira.codehaus.org/browse/WSTX-272 that implies even if xml11 is used that the characters would not get properly encoded.

So possible code solutions include:
* Use xml11 (I'm not sure that is valid wrt odata, requires an odata4j change, and may hit other woodstox issues such as WSTX-272)
* Rely on WSTX-293 - a document will be produced, but will be invalid.  Will the consumer be able to do anything meaningful with an invalid document?
* Introduce invalid character replacement in Teiid (possibly allowing the replacement to be configurable, etc.).  This could/should be an odata4j concern via http://www.cowtowncoder.com/blog/archives/2008/12/entry_106.html or some other mechanism to configure invalid character handling in woodstox.

Workarounds include:
* Have the user introduce views containing appropriate cleansing functions for the affected columns.
* Have the user introduce views that expose the affected columns as varbinary types.





                
> XML reserved characters not support in Odata
> --------------------------------------------
>
>                 Key: TEIID-2757
>                 URL: https://issues.jboss.org/browse/TEIID-2757
>             Project: Teiid
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 8.4
>         Environment: EAP version 6.1 with Teiid 8.5
>            Reporter: Marc Shirley
>            Assignee: Steven Hawkins
>         Attachments: TEIID-2757-Webservices-Stacktrace.txt
>
>
> The odata framework sometimes has problems with transforming characters (reserved in XML) from the source data to the XML result. The result is an exception: TEIID16013 Error occured producing OData result.: java.lang.RuntimeException: com.ctc.wstx.exc.WstxIOException: Invalid white space character (0x1b) in text to output (in xml 1.1, could output as a character entity).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the teiid-issues mailing list