JBoss.orgCommunity Documentation
This chapter gives you a short introduction to Smooks, Smooks tools and its installation.
First, have a look at the key features of Smooks tools:
Here, we provide you with a key functionality which is integrated in Smooks tools.
Table 1.1. Key Functionality for Smooks Tools
Feature | Benefit | Chapter |
---|---|---|
Smooks Configuration File Wizard | Smooks tools allows to create/edit the Smooks configuration file for Java2Java data transformation. | Smooks Configuration File Wizard |
Smooks Editor | Smooks Editor helps configure the created Smooks configuration file. | Smooks Editor |
Smooks is a Java Framework/Engine for processing XML and non XML data (CSV, EDI, Java, JSON etc).
Transformation: Perform a wide range of Data Transforms. Supports many different Source and Result types -XML/CSV/EDI/Java/JSON to XML/CSV/EDI/Java/JSON.
Java Binding: Bind into a Java Object Model from any data source (CSV, EDI, XML, Java, JSON etc).
Huge Message Processing: Process huge messages (GBs) - Split, Transform and Route message fragments to JMS, File, Database etc destinations. Route multiple message formats to multiple destinations in a single pass over a message.
Message Enrichment: Enrich a message with data from a Database, or other Datasources.
Combine: Combine the above features in different ways e.g. add Message Enrichment as part of a Splitting and Routing process.
For more informations about Smooks, please visit Smooks official site.
Smooks tools is a set of graphical tools for editing Smooks configuration file based on Eclipse.
The easiest way to use the Smooks Configuration Editor is to create a project (Java project, an ESB project, etc.), right-click on it and select New -> Other to open the New wizard. Drill into Smooks -> Smooks Configuration File and continue through the wizard. We recommend using a minimum Smooks level of 1.1 or 1.2, but if you're using it in a deployed service, it depends on what version your runtime supports. Once the file is created, it will open in the Smooks Configuration Editor.
The Smooks tools was included by the JBoss Tools since 3.0.0 Beta1 version. You can download the JBoss Tools from JBoss download site.
Smooks tools (JBoss Tools) run with the latest Eclipse and other required plug-ins (GEF, EMF, etc.).
You should download the latest IDE for Java EE developers from Eclipse site. It contains many plug-ins ( GEF, EMF, etc. ) required by Smooks dev tools.
The Smooks Configuration depends on having all of the appropriate Smooks runtime jars in the path of the Eclipse Plug-in or Java Project in the Eclipse workspace. The easiest solution is to do the following:
1) Download the Smooks distribution from here: http://www.smooks.org/mediawiki/index.php?title=Downloads . Grab the latest "ALL" distribution (as of today, it is the Smooks v.1.2.2 "ALL" distribution) and it will include binaries, examples, etc.
2) Extract files from the archive somewhere on your machine.
3) In your Eclipse workspace, copy the Smooks jars into a directory of your Eclipse plug-in or Java project named "lib".
4) For your Eclipse Plug-in or Java Project, right-click on the project and select Properties.
5) Select the "Java Build Path" item in the Properties list, select the Libraries tab, and click "Add JARs"
6) In the Jar Selection dialog, select all the jars in the "lib" directory mentioned in step 3 and click OK.
7) Click OK to close the Properties dialog. Now you should see a "Referenced Libraries" node that appeared in your project hierarchy in Eclipse.
Now let's progress to more advanced topics.