I have a proxy which accepts XML files with Base64 encoded files in it. For example the XML looks like:
Hello World
You have several options,
If file sizes are small, iterate through <attachments>
and for each attachment, decode using the script mediator and write to a file with syntax like,
<property name="transport.vfs.ReplyFileName" expression="expression-to-compute-file-name" scope="transport"/> <property action="set" name="OUT_ONLY" value="true"/> <send> <endpoint> <address uri="vfs:file:///home/user/test/out"/> </endpoint> </send>
If the files are large then it's more efficient to write your own class mediator
Send the files to an local filesystem . Use VFS proxy