Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7058

Extra CDATA elements added on long CDATA payload

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.18, 3.1.7
    • Fix Version/s: 3.1.8, 3.0.13
    • Component/s: Core
    • Labels:
      None
    • Environment:

      All

    • Estimated Complexity:
      Unknown

      Description

      When calling StaxUtils.copy() with a source xml that contains a long CDATA section, that long CDATA is sent in chunks to the writer, with each chunk being wrapped in a CDATA independently.

      For instance,

      <![CDATA[a..z]]>

      in the source ends in the destination as

      <![CDATA[a.]]><![CDATA[.z]]>

      This can be verified by running the test org.apache.cxf.staxutils.StaxUtilsTest.testCopy() with the attached xml file (headerSoapReqLongCdata.xml).

      I reported this initially to woodstox (https://github.com/FasterXML/woodstox/issues/21 and https://github.com/FasterXML/woodstox/issues/22),, but from Tatu's last answer (https://github.com/FasterXML/woodstox/issues/22#issuecomment-246254486) is is something that should be handled in CXF's StaxUtils.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dkulp Daniel Kulp
                Reporter:
                elrodro83 Rodrigo Merino
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: