You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/08/10 12:54:00 UTC

[jira] [Updated] (CAMEL-18368) Kamelet jslt-action not handling byte[] input

     [ https://issues.apache.org/jira/browse/CAMEL-18368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-18368:
--------------------------------
    Fix Version/s: 3.18.2
                   3.19.0

> Kamelet jslt-action not handling byte[] input
> ---------------------------------------------
>
>                 Key: CAMEL-18368
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18368
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-k
>         Environment: The samples have been tested with the Camel K Operator 1.9.x on an OpenShift environment.
>            Reporter: Bruno Meseguer
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.18.2, 3.19.0
>
>         Attachments: stage1-telegram-jira.tar.gz
>
>
> the [jslt-action] kamelet, based on the JSLT component is very handy for performing data transformations with JSON input.
> However, when configuring KameletBindings, for non-Camel users, it becomes tricky as some Kamelet sources deliver JSON in byte[]. If we bind for example a Telegram Source with the JSLT action before sending it to some backend, the process fails with the following message:
> {code:java}
> org.apache.camel.ValidationException: Allowed body types are String or InputStream.. Exchange[]{code}
>  One way to work around the problem is to customise the JSLT-action to convert the body to String, or modify the Telegram source to deliver String JSON payloads.
> Attached is a sample project containing a modified JSLT-action and a sample KameletBinding connecting Telegram to the JSLT action. Note the modified action converts the body to String.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)