Solution consists of:
* scheduled rule
* dp:url-open to retrieve file
* base64 encode it (either its serialization for XML, or the binaryNode response for Non-XML)
* use set-file XML management operation to store the file
* access XML management interface from within a stylesheet to execute the request
Find the details in this developerWorks DataPower Forum posting:
At the end of the posting a shell-script for conversion of a file to its corresponding XML management set-file request is provided.
This is handy for use with doSoma tool.
Here file "testfile" gets stored as "local:///myTestfile2" in "default" domain ...
$ set-file local://myTestfile2 testfile default | doSoma admin - dp3-l3:5550 |\
> tidy -q -xml
Enter host password for user 'admin':
<?xml version="1.0" encoding="utf-8"?>