Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6343

Stax support for toggling namespace awareness

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.11.0
    • 2.11.1, 2.12.0
    • camel-stax
    • None
    • Patch Available
    • Unknown

    Description

      There is an issue with the default stax XMLEventReader that makes unmarshalling xml's result in null values when the xml has a top-level namespace that defines a xmltype that does not match the tag name of the object to be unmarshalled. With how camel-stax is written, the only way around it is to change the source xml file, which seems like an unnecessary harsh penalty for all the quirky xml files out there. Therefore, I propose a solution to have the xml reader ignore namespaces and thereby making the reader a lot more flexible.

      With this feature, someone can just add a boolean to the stax method:

      .split(stax(Product.class, false))

      Attachments

        1. StAXJAXBIteratorExpressionPatch.txt
          3 kB
          Kevin Yao
        2. StAXBuilderPatch.txt
          1 kB
          Kevin Yao

        Activity

          People

            davsclaus Claus Ibsen
            kzmeyao Kevin Yao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: