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

stax outTransform cannot deep-drop an element that has some attributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.8, 2.6.5, 2.7.2
    • 2.5.9, 2.6.6, 2.7.3, 3.0.0-milestone1
    • Core
    • None
    • Unknown

    Description

      When trying to remove a specific element and its child elements (i.e., deep-drop) using stax transform feature, it fails to remove the element when there are some attributes present in that element.

      This error is indicated by the following exception stack trace:

      javax.xml.stream.XMLStreamException: Trying to write an attribute when there is no open start element.
      at com.ctc.wstx.sw.BaseStreamWriter.throwOutputError(BaseStreamWriter.java:1522)
      at com.ctc.wstx.sw.BaseStreamWriter.reportNwfStructure(BaseStreamWriter.java:1551)
      at com.ctc.wstx.sw.BaseNsStreamWriter.writeAttribute(BaseNsStreamWriter.java:226)
      at org.apache.cxf.staxutils.DelegatingXMLStreamWriter.writeAttribute(DelegatingXMLStreamWriter.java:79)
      at org.apache.cxf.staxutils.transform.OutTransformWriter.writeAttribute(OutTransformWriter.java:442)
      at org.apache.cxf.staxutils.StaxUtils.writeStartElement(StaxUtils.java:682)
      at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:574)

      Attachments

        Activity

          People

            ay Akitoshi Yoshida
            ay Akitoshi Yoshida
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: