[
https://issues.apache.org/jira/browse/CAMEL-26126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18136539#comment-18136539
]
Claus Ibsen commented on CAMEL-26126:
-------------------------------------
PR: https://github.com/apache/camel/pull/28904
When the body has no direct converter to XMLStreamReader, the StAX producer now
reads it as an InputStream and converts that with the same secured
StaxConverter factory (no DTDs, no external entities). A byte[], a Path and a
DOM Document now work. A Map or no body still fail. No new core converters: a
DOMSource does not work with the JDK StAX factory, and reading the Document as
a stream works with any StAX implementation.
_Claude Code on behalf of Claus Ibsen (davsclaus)_
> 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
> Assignee: Claus Ibsen
> Priority: Minor
> 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)