You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2008/05/01 20:14:56 UTC

[jira] Created: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Synapse doesn't preserve CDATA sections
---------------------------------------

                 Key: SYNAPSE-280
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
             Project: Synapse
          Issue Type: Bug
    Affects Versions: NIGHTLY
            Reporter: Andreas Veithen
            Priority: Minor


When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:

http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html

A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).

The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:

StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);


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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593751#action_12593751 ] 

Andreas Veithen commented on SYNAPSE-280:
-----------------------------------------

I'm quite comfortable with the fix, but I expect problems with AXIOM and Axis2 (and maybe also existing code in Synapse). The reason is that:
* Recently, issues with CDATA sections have been discovered: see WSCOMMONS-305.
* When I applied my fix, I immediately got another error related to a misbehavior in AXIOM: see WSCOMMONS-338.
* There might be code around that implicitly relies on the assumption that the parser is coalescing. Indeed, in non coalescing mode, there will be OMElement nodes with adjacent OMText children and there might be code that is not prepared to handle this.

Anyway, before applying the fix, we need to wait for WSCOMMONS-338 to be fixed and for this fix to be included in a new release of AXIOM. So we should keep this issue in the pipe for the next Synapse release after 1.2.

> Synapse doesn't preserve CDATA sections
> ---------------------------------------
>
>                 Key: SYNAPSE-280
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Priority: Minor
>
> When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:
> http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html
> A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).
> The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:
> StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593857#action_12593857 ] 

Andreas Veithen commented on SYNAPSE-280:
-----------------------------------------

I ran the Axis2 unit tests with a non coalescing parser and discovered yet another issue with CDATA sections in AXIOM: WSCOMMONS-339.

> Synapse doesn't preserve CDATA sections
> ---------------------------------------
>
>                 Key: SYNAPSE-280
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Priority: Minor
>             Fix For: FUTURE
>
>
> When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:
> http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html
> A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).
> The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:
> StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated SYNAPSE-280:
------------------------------------

    Component/s: Core

> Synapse doesn't preserve CDATA sections
> ---------------------------------------
>
>                 Key: SYNAPSE-280
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.3
>
>
> When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:
> http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html
> A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).
> The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:
> StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated SYNAPSE-280:
------------------------------------

    Fix Version/s:     (was: FUTURE)
                   1.3
         Assignee: Andreas Veithen

> Synapse doesn't preserve CDATA sections
> ---------------------------------------
>
>                 Key: SYNAPSE-280
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.3
>
>
> When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:
> http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html
> A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).
> The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:
> StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Resolved: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved SYNAPSE-280.
-------------------------------------

    Resolution: Fixed

The feature introduced by WSCOMMONS-461 can be used to configure Synapse to preserve CDATA sections. Added relevant documentation explaining how to set this up.

> Synapse doesn't preserve CDATA sections
> ---------------------------------------
>
>                 Key: SYNAPSE-280
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.3
>
>
> When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:
> http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html
> A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).
> The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:
> StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Asankha C. Perera updated SYNAPSE-280:
--------------------------------------

    Fix Version/s: FUTURE

Ok.. I think we can consider this for the future releases then..

thanks
asankha

> Synapse doesn't preserve CDATA sections
> ---------------------------------------
>
>                 Key: SYNAPSE-280
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Priority: Minor
>             Fix For: FUTURE
>
>
> When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:
> http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html
> A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).
> The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:
> StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12699888#action_12699888 ] 

Andreas Veithen commented on SYNAPSE-280:
-----------------------------------------

Some additional information related to this issue:

http://markmail.org/message/uhfxzumb5seq6463


> Synapse doesn't preserve CDATA sections
> ---------------------------------------
>
>                 Key: SYNAPSE-280
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
>             Project: Synapse
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.3
>
>
> When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:
> http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html
> A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).
> The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:
> StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-280) Synapse doesn't preserve CDATA sections

Posted by "Asankha C. Perera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593732#action_12593732 ] 

Asankha C. Perera commented on SYNAPSE-280:
-------------------------------------------

Andreas

If you are comfortable with the suggested fix, lets get it in.. I am going to do the first QA build for 1.2 on Monday.. and that will get us testing coverage

thanks
asankha 

> Synapse doesn't preserve CDATA sections
> ---------------------------------------
>
>                 Key: SYNAPSE-280
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-280
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: NIGHTLY
>            Reporter: Andreas Veithen
>            Priority: Minor
>
> When a message is received by Synapse, any CDATA section is transformed into a normal text node. This issue has been discussed on the mailing list, but without getting to a conclusion:
> http://www.nabble.com/Interesting-problem-introduced-by-CDATA-section-to16321118.html
> A closer look reveals that the origin of the problem is that Woodstox by default creates parsers in coalescing mode, implying that adjacent CDATA sections and text nodes are combined and reported as a single CHARACTER event. Therefore information about CDATA sections is lost. Note that enabling coalescing by default is contrary to the StAX specifications and this is a bug in the Woodstox version used by Synapse (see http://jira.codehaus.org/browse/WSTX-140).
> The problem can be solved for Synapse in standalone mode by adding the following instruction to ServerManager#start:
> StAXUtils.getXMLInputFactory().setProperty(XMLInputFactory.IS_COALESCING, Boolean.FALSE);

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org