Tuesday Mar 03, 2009

Using encoders to parse CSV files in OpenESB

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.

The Open ESB wiki has more information about Encoders and examples.

Screencast (11mins)


About

jason

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today