Using encoders to parse CSV files in OpenESB
By jason on Mar 03, 2009
This screencast provides a simple example of encoding a multi-line CSV file into XML as part of a Glassfish ESB application.
The JBI framework underlying Open ESB, Glassfish ESB, and Java CAPS requires XML msgs to move between the service units. Custom Encoders provide a means to encode/decode structured data to/from XSD defined documents. Encoders are then applied to payloads as the pass through Binding Components on their way in/out of the framework.
This example was
plagiarised reused from an example by Sebastien. It shows a multi-line CSV file generated from an OpenOffice spreadsheet. A custom encoder is then created to translate it into a well-defined XML file when it picked up by the File BC. The encoder is enhanced to remove quote marks that are added by OpenOffice to string values when saving as CSV.