davsclaus commented on issue #480: URL: https://github.com/apache/camel-karavan/issues/480#issuecomment-1253779969
You need to use `joor` language when inlining java code (it uses joor-java) ``` expression: joor: expression: >- byte[] fileBytes = exchange.getIn().getBody(byte[].class); org.apache.camel.attachment.AttachmentMessage attMsg = exchange.getIn(org.apache.camel.attachment.AttachmentMessage.class); attMsg.addAttachment("report.pdf", new javax.activation.DataHandler(fileBytes, "application/pdf")); return exchange.getMessage().getBody(); ``` PS: We may rename `joor` to just `java` to make it less confusing. Also you need to use fully qualified class names which you almost had, try with above ^^^ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org