Hi Roos, I've never tested that. One could try to experiment creating a bean which is runtime specific. And then use that bean from the splitter.
With Camel Quarkus runtime, maybe it would give something ala: @Named("myBean") SplitAttachmentsExpression exp = new SplitAttachmentsExpression(true); And then use it from a splitter with: <method ref="myBean" https://camel.apache.org/manual/registry.html hth, Alex On Wed, Jul 26, 2023 at 2:01 AM Ross Woolf <r...@rosswoolf.com> wrote: > I'm wanting to make the attachments to be a byte array as the body of the > message, but the documentation is unclear to me how I can do this. > > In the mail component documentation at > https://camel.apache.org/components/3.21.x/mail-component.html it says: > --------------- > <split> > <method > beanType="org.apache.camel.component.mail.SplitAttachmentsExpression"/> > <to uri="mock:split"/> > </split> > You can also split the attachments as byte[] to be stored as the message > body. This is done by creating the expression with boolean true > > SplitAttachmentsExpression split = SplitAttachmentsExpression(true); > And then use the expression with the splitter EIP. > ----------------- > I'm using XML DSL and I'm not sure how I do this part in XML: > "SplitAttachmentsExpression split = SplitAttachmentsExpression(true);" > > Can someone help me understand how to construct that as part of the XML > DSL so that the attachments will become the body of the message? >