[
https://issues.apache.org/jira/browse/CAMEL-21652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17916898#comment-17916898
]
Claus Ibsen commented on CAMEL-21652:
-------------------------------------
Using type converter is not an ideal way for data transformation - its just
happen that XML has that Document type from the JDK. But most others would need
transformation via data formats such as jackson and the many data formats Camel
have.
We have to be careful to not make the DSL more complex with more options
> ResultType for Variable receive
> -------------------------------
>
> Key: CAMEL-21652
> URL: https://issues.apache.org/jira/browse/CAMEL-21652
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Bruno Meseguer
> Priority: Major
>
> For certain data manipulations, we need to set the type of the Variable to a
> particular class.
> That step forces the user to add extra actions.
> For XML transformations for instance, the process needs to work with
> `Document` when applying XLSTs.
> In the old days, to get it right we needed 4 steps:
> # Call backend
> # convertBodyTo (Document)
> # Body -> SetHeader
> # Execute XSLT (Data Mapper)
> Then Variables were added to Camel Core and now we can save 1 step:
> # Call backend -> store in Variable
> # convertVariableTo (Document)
> # Execute XSLT (Data Mapper)
> The request is to enhance the "Receive Variable" feature to also define the
> Type of the variable, to save an extra step, so the user just needs:
> # Call backend -> store in Variable with Type (Document)
> # Execute XSLT (Data Mapper)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)