WSO2 ESB - writing files out of base64
I have a proxy which accepts XML files with Base64 encoded files in it. For example the XML looks like: <message> <content>Hello World</content> <attachements> <attachement>*Base64 code here*</attachement> <attachement>*Base64 code here*</attachement> <attachement>*Base64 code here*</attachement> </attachements> </message> My Problem: I like to save the decoded files from the message into a folder of the filesystem of the server running the ESB. But how can I do this? If I encode a simple text like "Hello World" with Base64 I can decode it with an Script Mediator and Javascript, but how can I