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

JaxbDataFormat.unmarshal should use passed Exchange when converting given InputStream into XMLStreamReader

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.21.1
    • Fix Version/s: 2.21.3, 2.22.1, 2.23.0
    • Component/s: camel-jaxb
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      From JaxbDataFormat.unmarshal:

      ...
      XMLStreamReader xmlReader;
        if (needFiltering(exchange)) {
          xmlReader = typeConverter.convertTo(XMLStreamReader.class, createNonXmlFilterReader(exchange, stream));
        } else {
          xmlReader = typeConverter.convertTo(XMLStreamReader.class, stream);
        }
      ...
      

      The passed Exchange is not used during the convertTo invocation. Any other invocation in the JaxbDataFormat class passes the given Exchange object.
      Passing the Exchange object gives a chance to the type converter to configure itself before converting.

        Attachments

          Activity

            People

            • Assignee:
              onders Onder Sezgin
              Reporter:
              christianr Christian Ribeaud
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: