Recently was working on a project where I had a to read an XML file from an FTP location, transform it and expose it as an API. Used WSO2 ESB 4.6.0 for this usecase; and I thought of documenting it for later reference. So here it goes
First the proxy that read the file from FTP and dump it to a defined location, (VFSProxy.xml)
This proxy will dump the file to
This file need to be read on-demand, once requested. ESB by default does not have a mediator to read XML files so that the mediation flow can manipulate the content, Continue reading Reading an XML file into WSO2 ESB; Transform it and expose it as an API
Is something I’ve been working on at wso2 for sometime, if you are following me I have tweeted the updates, releases etc. Jaggery went live with its fifth milestone, few weeks ago at jaggeryjs.org, its still young and has alot to improve.
A very simple page that prints out some request properties in jaggery looks like,
print("Method : " + request.getMethod() + "<br/>");
print("Protocol : " + request.getProtocol() + "<br/>");
print("User-Agent : " + request.getHeader("User-Agent"));
Jaggery docs site also provide a tool for you to try out some code and play around. So you can simply copy the above code and paste in jaggery try-it
I recently did a webinar on jaggery that explains the simple case, over looking its API and samples. Below is the recording hope it’ll help.