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 2021/10/07 05:17:00 UTC
[jira] [Commented] (CAMEL-17046) camel-datasonnet - Datasonnet
methods bodyMediaType and outputMediaType is missing in Java DSL
[ https://issues.apache.org/jira/browse/CAMEL-17046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425345#comment-17425345 ]
Claus Ibsen commented on CAMEL-17046:
-------------------------------------
As workaround you can create the DataSonnetExpression where you can set those types and use in the DSL
> camel-datasonnet - Datasonnet methods bodyMediaType and outputMediaType is missing in Java DSL
> ----------------------------------------------------------------------------------------------
>
> Key: CAMEL-17046
> URL: https://issues.apache.org/jira/browse/CAMEL-17046
> Project: Camel
> Issue Type: Bug
> Affects Versions: 3.11.1, 3.11.2, 3.11.0
> Reporter: Henrik Karlsson
> Priority: Minor
> Fix For: 3.13.0
>
>
> According to the [documentation|https://camel.apache.org/components/latest/languages/datasonnet-language.html] you should be able to specify the body and output media type using the convenience methods bodyMediaType() and outputMediaType(). But these methods aren't available in the Java DSL. Trying to use bodyMediaType() the IDE (Eclipse) reports this error:
> "The method bodyMediaType(String) is undefined for the type ValueBuilder"
> Compiling gives this error:
> "Compilation failure:
> [ERROR] Routes.java:[37,85] cannot find symbol
> [ERROR] symbol: method bodyMediaType(java.lang.String)
> [ERROR] location: class org.apache.camel.builder.ValueBuilder"
--
This message was sent by Atlassian Jira
(v8.3.4#803005)