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

StreamWriterContentHandler.getPrefix shouldn't return null if DEFAULT_NS_PREFIX is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3, 2.2.11
    • None
    • None

    Description

      think about the message like
      <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><add xmlns="http://apache.org/cxf/calculator/types"><arg0>1</arg0><arg1>2</arg1></add></soap:Body></soap:Envelope>
      here "add" element has namespace http://apache.org/cxf/calculator/types, but use DEFAULT_NS_PREFIX "", in this case getPrefix should empty string "" , but not null.

      Attach a testcase to expose this problem, current code will throw XMLStreamException

      Attachments

        1. testcase.patch
          3 kB
          Freeman Yue Fang

        Activity

          People

            ffang Freeman Yue Fang
            ffang Freeman Yue Fang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: