Reputation: 11
I am working with Camel Routes (XML) to process a MIME request that contains attachments. I have successfully unmarshalled the request using . However, when I log the body of the unmarshalled request, it only shows the content of the first attachment.
I would like to know how I can refer to all the parts (attachments) of the unmarshalled request. Specifically, I need to access the content of each attachment individually.
Is there a way to iterate over the attachments or retrieve them by some other means in Camel Routes (XML)? Any guidance or examples would be greatly appreciated.
My camel route
<routes xmlns = "http://camel.apache.org/schema/spring">
<route id = "direct:uploadDocument" streamCache = "true">
<from uri = "direct:uploadDocument"/>
<bean ref = "logger" method = "info(request = ${body})"/>
<unmarshal><mimeMultipart/></unmarshal>
<bean ref ="logger" method = "info('Unmarshal successful')"/>
<bean ref = "logger" method = "info(Unmarshalled request = ${body})"/>
</route>
</routes>
Upvotes: 1
Views: 112