Claus Ibsen created CAMEL-26126:
-----------------------------------

             Summary: camel-stax - a byte[], Path or DOM Document body fails 
with no converter to XMLStreamReader
                 Key: CAMEL-26126
                 URL: https://issues.apache.org/jira/browse/CAMEL-26126
             Project: Camel
          Issue Type: Bug
          Components: camel-stax
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while adding the catalog body types of stax, fop, flatpack and dfdl 
(CAMEL-24961, PR #28417).

h4. 1. A byte[], Path or DOM Document body fails

{{StAXProcessor.process}} (main 2a465aa4814c, line 53) reads the body with 
{{getMandatoryBody(XMLStreamReader.class)}}, and there is no converter to 
{{XMLStreamReader}} from a {{byte[]}}, a {{java.nio.file.Path}} or a DOM 
{{Document}}, so these bodies fail with NoTypeConversionAvailableException 
while a String, an InputStream, a File or a Source work. Checked on 
4.24.0-SNAPSHOT in-process.

Proposed: add the converters (byte[] and Path through an InputStream, a DOM 
node through a DOMSource), or document the accepted bodies.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to