<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
>

<channel>
	<title>Smooks Data Integration</title>
	<atom:link href="http://blog.smooks.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.smooks.org</link>
	<description>The official blog</description>
	<lastBuildDate>Thu, 05 May 2011 11:52:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<!-- podcast_generator="Blubrry PowerPress/1.0.7" mode="simple" entry="normal" -->
	<itunes:summary>The official blog</itunes:summary>
	<itunes:author>Smooks Data Integration</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://blog.smooks.org/wp-content/plugins/powerpress/itunes_default.jpg" />
	<itunes:owner>
		<itunes:name>Smooks Data Integration</itunes:name>
		<itunes:email>tom.fennelly@gmail.com</itunes:email>
	</itunes:owner>
	<managingEditor>tom.fennelly@gmail.com (Smooks Data Integration)</managingEditor>
	<itunes:subtitle>The official blog</itunes:subtitle>
	<image>
		<title>Smooks Data Integration</title>
		<url>http://blog.smooks.org/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://blog.smooks.org</link>
	</image>
		<item>
		<title>Feeding Java Events to a Drools Fusion CEP Process&#8230;</title>
		<link>http://blog.smooks.org/2011/05/05/feeding-java-events-to-a-drools-fusion-cep-process/</link>
		<comments>http://blog.smooks.org/2011/05/05/feeding-java-events-to-a-drools-fusion-cep-process/#comments</comments>
		<pubDate>Thu, 05 May 2011 11:05:28 +0000</pubDate>
		<dc:creator>Tom Fennelly</dc:creator>
				<category><![CDATA[CEP]]></category>
		<category><![CDATA[Drools]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=643</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/05/05/feeding-java-events-to-a-drools-fusion-cep-process/';
var dzone_title = 'Feeding Java Events to a Drools Fusion CEP Process&#8230;';
var dzone_blurb = 'Rob Greathouse (a co-worker of mine at JBoss) was recently asking me how he might use Smooks to feed Java Objects to a Drools Fusion CEP Process.  I took...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/05/05/feeding-java-events-to-a-drools-fusion-cep-process/';
var dzone_title = 'Feeding Java Events to a Drools Fusion CEP Process&#8230;';
var dzone_blurb = 'Rob Greathouse (a co-worker of mine at JBoss) was recently asking me how he might use Smooks to feed Java Objects to a Drools Fusion CEP Process.  I took...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Rob Greathouse (a co-worker of mine at JBoss) was recently asking me how he might use Smooks to feed Java Objects to a <a href="http://www.jboss.org/drools/drools-fusion.html">Drools Fusion</a> CEP Process.  I took the offical Drools Fusion Stock Tick CEP example and modified it to use Smooks.  <a href="http://www.smooks.org/mediawiki/index.php?title=V1.5:drools-fusion">Check it out&#8230;</a></p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/cep/">CEP</a> by Tom Fennelly <a href="http://blog.smooks.org/2011/05/05/feeding-java-events-to-a-drools-fusion-cep-process/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/05/05/feeding-java-events-to-a-drools-fusion-cep-process/';
var dzone_title = 'Feeding Java Events to a Drools Fusion CEP Process&#8230;';
var dzone_blurb = 'Rob Greathouse (a co-worker of mine at JBoss) was recently asking me how he might use Smooks to feed Java Objects to a Drools Fusion CEP Process.  I took...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Rob Greathouse (a co-worker of mine at JBoss) was recently asking me how he might use Smooks to feed Java Objects to a <a href="http://www.jboss.org/drools/drools-fusion.html">Drools Fusion</a> CEP Process.  I took the offical Drools Fusion Stock Tick CEP example and modified it to use Smooks.  <a href="http://www.smooks.org/mediawiki/index.php?title=V1.5:drools-fusion">Check it out&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2011/05/05/feeding-java-events-to-a-drools-fusion-cep-process/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Updated release of Eclipse EDI Editor</title>
		<link>http://blog.smooks.org/2011/05/04/updated-release-of-eclipse-edi-editor/</link>
		<comments>http://blog.smooks.org/2011/05/04/updated-release-of-eclipse-edi-editor/#comments</comments>
		<pubDate>Wed, 04 May 2011 07:31:32 +0000</pubDate>
		<dc:creator>zubairov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=631</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/05/04/updated-release-of-eclipse-edi-editor/';
var dzone_title = 'Updated release of Eclipse EDI Editor';
var dzone_blurb = 'I&#8217;m proud to announce a new release of Eclipse EDI Editor, now based on Smooks 1.5. This version includes following improvements:Migrated to the...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>I&#8217;m proud to announce a new release of Eclipse EDI Editor, now based on Smooks 1.5. This version includes following improvements:</p>
<ul>
<li>Migrated to the Smooks 1.5 (SNAPSHOT), which mean that if Smooks can parse your EDI file you can be pretty sure that Eclipse EDI Editor can do it too. It is consistent with Smooks 1.5 in reading and writing EDI files.</li>
<li>Improved rendering of Component nodes in the editor (see screenshot below)</li>
<li>Dynamically loading smooks mapping schemas from the mapping bundles generated by smooks, which are (with fixed <a href="http://jira.codehaus.org/browse/MILYN-600" target="_blank">MILYN-600</a>) are acting as Eclipse plugins now.</li>
<li>Bringing not only ability to edit UN/EDIFACT files but also contribute all XML Schemas for smooks EDI XML to the Eclipse, so you could edit and validate EDI XML.</li>
</ul>
<div>
<a href="http://blog.smooks.org/wp-content/uploads/2011/05/edieditor.png"><img class="size-full wp-image-633 aligncenter" title="edieditor" src="http://blog.smooks.org/wp-content/uploads/2011/05/edieditor.png" alt="edieditor" width="430" height="323" /></a>
</div>
<p>To install the Smooks Eclipse EDI Editor just point your Eclipse Update Manager to this URL:</p>
<p><a href="http://d1ce9rnyxjnscn.cloudfront.net/edi-editor" target="_blank">http://d1ce9rnyxjnscn.cloudfront.net/edi-editor</a></p>
<p>Here is a screencast that shows how to install and use EDI Editor. I recommend you to install it into Eclipse Helios SR2 JEE distribution (this way you will save time to download missing plugins).</p>
<p><a href="http://screencast.com/t/kwEId1tSce">http://screencast.com/t/kwEId1tSce</a></p>
<p>Source of the plugin is available on the Github:</p>
<p><a href="https://github.com/zubairov/edieditor">https://github.com/zubairov/edieditor</a></p>
<p>Check it out and let us know what you think.</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/uncategorized/">Uncategorized</a> by Zubairov <a href="http://blog.smooks.org/2011/05/04/updated-release-of-eclipse-edi-editor/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/05/04/updated-release-of-eclipse-edi-editor/';
var dzone_title = 'Updated release of Eclipse EDI Editor';
var dzone_blurb = 'I&#8217;m proud to announce a new release of Eclipse EDI Editor, now based on Smooks 1.5. This version includes following improvements:Migrated to the...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>I&#8217;m proud to announce a new release of Eclipse EDI Editor, now based on Smooks 1.5. This version includes following improvements:</p>
<ul>
<li>Migrated to the Smooks 1.5 (SNAPSHOT), which mean that if Smooks can parse your EDI file you can be pretty sure that Eclipse EDI Editor can do it too. It is consistent with Smooks 1.5 in reading and writing EDI files.</li>
<li>Improved rendering of Component nodes in the editor (see screenshot below)</li>
<li>Dynamically loading smooks mapping schemas from the mapping bundles generated by smooks, which are (with fixed <a href="http://jira.codehaus.org/browse/MILYN-600" target="_blank">MILYN-600</a>) are acting as Eclipse plugins now.</li>
<li>Bringing not only ability to edit UN/EDIFACT files but also contribute all XML Schemas for smooks EDI XML to the Eclipse, so you could edit and validate EDI XML.</li>
</ul>
<div>
<a href="http://blog.smooks.org/wp-content/uploads/2011/05/edieditor.png"><img class="size-full wp-image-633 aligncenter" title="edieditor" src="http://blog.smooks.org/wp-content/uploads/2011/05/edieditor.png" alt="edieditor" width="430" height="323" /></a>
</div>
<p>To install the Smooks Eclipse EDI Editor just point your Eclipse Update Manager to this URL:</p>
<p><a href="http://d1ce9rnyxjnscn.cloudfront.net/edi-editor" target="_blank">http://d1ce9rnyxjnscn.cloudfront.net/edi-editor</a></p>
<p>Here is a screencast that shows how to install and use EDI Editor. I recommend you to install it into Eclipse Helios SR2 JEE distribution (this way you will save time to download missing plugins).</p>
<p><a href="http://screencast.com/t/kwEId1tSce">http://screencast.com/t/kwEId1tSce</a></p>
<p>Source of the plugin is available on the Github:</p>
<p><a href="https://github.com/zubairov/edieditor">https://github.com/zubairov/edieditor</a></p>
<p>Check it out and let us know what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2011/05/04/updated-release-of-eclipse-edi-editor/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Migrating to Gradle: unedifact module</title>
		<link>http://blog.smooks.org/2011/04/04/migrating-to-gradle-unedifact-module/</link>
		<comments>http://blog.smooks.org/2011/04/04/migrating-to-gradle-unedifact-module/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 09:25:57 +0000</pubDate>
		<dc:creator>Daniel Bevenius</dc:creator>
				<category><![CDATA[Gradle]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=613</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/04/04/migrating-to-gradle-unedifact-module/';
var dzone_title = 'Migrating to Gradle: unedifact module';
var dzone_blurb = 'This is just a short blog about migrating to Gradle. First up is the unedifact module. The following were the immediate benifits as we see them:Simpler...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/04/04/migrating-to-gradle-unedifact-module/';
var dzone_title = 'Migrating to Gradle: unedifact module';
var dzone_blurb = 'This is just a short blog about migrating to Gradle. First up is the unedifact module. The following were the immediate benifits as we see them:Simpler...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>This is just a short blog about migrating to Gradle. First up is the <a href="https://github.com/smooks/unedifact">unedifact</a> module. The following were the immediate benifits as we see them:</p>
<ul>
<li>Simpler versioning of the projects which was a hassle previously as we were using Maven inheritance.
</li>
<li>Less files to maintain. </li>
<li>Easier to work around specific issues since we have access to the Groovy programming language. </li>
<li>Now we have project dependencies between the modules which means that we no longer have to build in a specific order, for example first install the mapping project before installing the binding project.</li>
</ul>
<p><strong>Background</strong></p>
<p>The unedifact module is used to generate the mappings and bindings for various unedifact specifications. For each specification there is a subfolder that is named after the spec.</p>
<p><strong>settings.gradle</strong></p>
<p>This file is where we list all the projects that are to be included in this build. As described in the background section each specification is in a subfolder of the root directory unedifact. But these subfolders are them selves not project but contain projects. For example, a spec folder can contain a &#8216;mapping&#8217; project, a &#8216;binding&#8217; project, and a &#8216;test&#8217; project.</p>
<p>We opted to use the following settings.xml to avoid having to manually update this file when new spec are added:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
projectDir = rootProject.getProjectDir().getAbsolutePath()
specsPattern = ~/[\w][\d][\d][\w]/

new File(projectDir).eachFileMatch(specsPattern) { specDir ->
    specDir.eachFileMatch(~/(mapping|binding|test)/) { subModule ->
        moduleName = ":${specDir.getName()}/${subModule.getName()}"
        include moduleName
    }
}
</pre>
<p><strong>build.gradle</strong><br />
This is where the main part of the configuration is done, well at the moment everything is done in this root build.gradle, but there is nothing stopping subprojects from adding their own build.gradle file and overriding or adding functionality. We have configuration parts that are common to all project and subproject and also configuration sections that are specific for the &#8216;mapping&#8217;, &#8216;binding&#8217;, and &#8216;test&#8217; projects. </p>
<p>There are project dependencies between the &#8216;mapping&#8217; project and the &#8216;binding&#8217; project since the &#8216;binding&#8217; project uses the mappings generated by the &#8216;mapping&#8217; project.<br />
The &#8216;test&#8217; project, if it exists, depends on either the &#8216;mapping&#8217; project only or both the &#8216;mapping&#8217; and the &#8216;binding&#8217; project. </p>
<p>To build you can simply run &#8216;gradle&#8217; from any of the subproject and it will build its dependencies:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
> gradle
</pre>
<p>This will run a default task which we have set to &#8216;build&#8217;, so this is the same as running:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
 gradle build
</pre>
<p><strong>Adding a new specification</strong><br />
To do this need to create a directory named after the specification. Then create the mapping directory and put the specification zip file in the root of that directory.<br />
Run &#8216;gradle projects&#8217; to see that you newly added project was added:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
> gradle projects
------------------------------------------------------------
Root Project - Smooks Unedifact project
------------------------------------------------------------

Root project 'unedifact' - Smooks Unedifact project
+--- Project ':d00a/binding'
+--- Project ':d00a/mapping'
+--- Project ':d00b/binding'
...
</pre>
<p>Building is done in the same way as described earlier in this post.</p>
<p><strong>Uploading to Nexus</strong><br />
To deploy artifacts first create a gradle.properties in the root project directory:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
milynUser=yourUserName
milynPassword=yourPassword
</pre>
<p>Uploading to nexus is now done like this</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
> gradle uploadArchives
</pre>
<p><strong>Conclusion</strong><br />
While I&#8217;m still in the process of learning Gradle and Groovy I feel that most things can be worked around by being able to actually write code, and not having to use xml is very refreshing.<br />
One thing that I added was the task <a href="http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-bashcompletion">completion</a> which worked like a charm. I added the following tasks to it:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
tasks='clean compile dists javadoc jar test war build tasks comparePoms install properties projects uploadArchives'
</pre>
<p>This will enable task completion so that you can simply type the first few letters of a task and it will complete bash will complete the name for you, like you can do with git.</p>
<p>Next step is to migrate the main Smooks code base to Gradle</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/gradle/">Gradle</a> by Daniel Bevenius <a href="http://blog.smooks.org/2011/04/04/migrating-to-gradle-unedifact-module/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/04/04/migrating-to-gradle-unedifact-module/';
var dzone_title = 'Migrating to Gradle: unedifact module';
var dzone_blurb = 'This is just a short blog about migrating to Gradle. First up is the unedifact module. The following were the immediate benifits as we see them:Simpler...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>This is just a short blog about migrating to Gradle. First up is the <a href="https://github.com/smooks/unedifact">unedifact</a> module. The following were the immediate benifits as we see them:</p>
<ul>
<li>Simpler versioning of the projects which was a hassle previously as we were using Maven inheritance.
</li>
<li>Less files to maintain. </li>
<li>Easier to work around specific issues since we have access to the Groovy programming language. </li>
<li>Now we have project dependencies between the modules which means that we no longer have to build in a specific order, for example first install the mapping project before installing the binding project.</li>
</ul>
<p><strong>Background</strong></p>
<p>The unedifact module is used to generate the mappings and bindings for various unedifact specifications. For each specification there is a subfolder that is named after the spec.</p>
<p><strong>settings.gradle</strong></p>
<p>This file is where we list all the projects that are to be included in this build. As described in the background section each specification is in a subfolder of the root directory unedifact. But these subfolders are them selves not project but contain projects. For example, a spec folder can contain a &#8216;mapping&#8217; project, a &#8216;binding&#8217; project, and a &#8216;test&#8217; project.</p>
<p>We opted to use the following settings.xml to avoid having to manually update this file when new spec are added:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
projectDir = rootProject.getProjectDir().getAbsolutePath()
specsPattern = ~/[\w][\d][\d][\w]/

new File(projectDir).eachFileMatch(specsPattern) { specDir ->
    specDir.eachFileMatch(~/(mapping|binding|test)/) { subModule ->
        moduleName = ":${specDir.getName()}/${subModule.getName()}"
        include moduleName
    }
}
</pre>
<p><strong>build.gradle</strong><br />
This is where the main part of the configuration is done, well at the moment everything is done in this root build.gradle, but there is nothing stopping subprojects from adding their own build.gradle file and overriding or adding functionality. We have configuration parts that are common to all project and subproject and also configuration sections that are specific for the &#8216;mapping&#8217;, &#8216;binding&#8217;, and &#8216;test&#8217; projects. </p>
<p>There are project dependencies between the &#8216;mapping&#8217; project and the &#8216;binding&#8217; project since the &#8216;binding&#8217; project uses the mappings generated by the &#8216;mapping&#8217; project.<br />
The &#8216;test&#8217; project, if it exists, depends on either the &#8216;mapping&#8217; project only or both the &#8216;mapping&#8217; and the &#8216;binding&#8217; project. </p>
<p>To build you can simply run &#8216;gradle&#8217; from any of the subproject and it will build its dependencies:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
> gradle
</pre>
<p>This will run a default task which we have set to &#8216;build&#8217;, so this is the same as running:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
 gradle build
</pre>
<p><strong>Adding a new specification</strong><br />
To do this need to create a directory named after the specification. Then create the mapping directory and put the specification zip file in the root of that directory.<br />
Run &#8216;gradle projects&#8217; to see that you newly added project was added:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
> gradle projects
------------------------------------------------------------
Root Project - Smooks Unedifact project
------------------------------------------------------------

Root project 'unedifact' - Smooks Unedifact project
+--- Project ':d00a/binding'
+--- Project ':d00a/mapping'
+--- Project ':d00b/binding'
...
</pre>
<p>Building is done in the same way as described earlier in this post.</p>
<p><strong>Uploading to Nexus</strong><br />
To deploy artifacts first create a gradle.properties in the root project directory:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
milynUser=yourUserName
milynPassword=yourPassword
</pre>
<p>Uploading to nexus is now done like this</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
> gradle uploadArchives
</pre>
<p><strong>Conclusion</strong><br />
While I&#8217;m still in the process of learning Gradle and Groovy I feel that most things can be worked around by being able to actually write code, and not having to use xml is very refreshing.<br />
One thing that I added was the task <a href="http://docs.codehaus.org/display/GRADLE/Cookbook#Cookbook-bashcompletion">completion</a> which worked like a charm. I added the following tasks to it:</p>
<pre class="brush: plain; wrap-lines: false; toolbar: false">
tasks='clean compile dists javadoc jar test war build tasks comparePoms install properties projects uploadArchives'
</pre>
<p>This will enable task completion so that you can simply type the first few letters of a task and it will complete bash will complete the name for you, like you can do with git.</p>
<p>Next step is to migrate the main Smooks code base to Gradle</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2011/04/04/migrating-to-gradle-unedifact-module/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Processing Huge EDI data stream on a low memory and cpu footprint</title>
		<link>http://blog.smooks.org/2011/03/29/processing-huge-edi-data-stream-on-a-low-memory-and-cpu-footprint-2/</link>
		<comments>http://blog.smooks.org/2011/03/29/processing-huge-edi-data-stream-on-a-low-memory-and-cpu-footprint-2/#comments</comments>
		<pubDate>Tue, 29 Mar 2011 17:08:32 +0000</pubDate>
		<dc:creator>Tom Fennelly</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[EDI]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/2011/03/29/processing-huge-edi-data-stream-on-a-low-memory-and-cpu-footprint-2/</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/03/29/processing-huge-edi-data-stream-on-a-low-memory-and-cpu-footprint-2/';
var dzone_title = 'Processing Huge EDI data stream on a low memory and cpu footprint';
var dzone_blurb = 'Great post by Claus Straube: http://www.catify.com/2011/03/29/transforming-and-splitting-huge-edi-files-with-smooks/';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/03/29/processing-huge-edi-data-stream-on-a-low-memory-and-cpu-footprint-2/';
var dzone_title = 'Processing Huge EDI data stream on a low memory and cpu footprint';
var dzone_blurb = 'Great post by Claus Straube: http://www.catify.com/2011/03/29/transforming-and-splitting-huge-edi-files-with-smooks/';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Great post by Claus Straube: <a href="http://www.catify.com/2011/03/29/transforming-and-splitting-huge-edi-files-with-smooks/">http://www.catify.com/2011/03/29/transforming-and-splitting-huge-edi-files-with-smooks/</a></p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/uncategorized/">Uncategorized</a> by Tom Fennelly <a href="http://blog.smooks.org/2011/03/29/processing-huge-edi-data-stream-on-a-low-memory-and-cpu-footprint-2/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/03/29/processing-huge-edi-data-stream-on-a-low-memory-and-cpu-footprint-2/';
var dzone_title = 'Processing Huge EDI data stream on a low memory and cpu footprint';
var dzone_blurb = 'Great post by Claus Straube: http://www.catify.com/2011/03/29/transforming-and-splitting-huge-edi-files-with-smooks/';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Great post by Claus Straube: <a href="http://www.catify.com/2011/03/29/transforming-and-splitting-huge-edi-files-with-smooks/">http://www.catify.com/2011/03/29/transforming-and-splitting-huge-edi-files-with-smooks/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2011/03/29/processing-huge-edi-data-stream-on-a-low-memory-and-cpu-footprint-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New feature for EDI Parser &#8211; Namespaces support</title>
		<link>http://blog.smooks.org/2011/03/02/new-feature-for-edi-parser-namespaces-support/</link>
		<comments>http://blog.smooks.org/2011/03/02/new-feature-for-edi-parser-namespaces-support/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 11:38:09 +0000</pubDate>
		<dc:creator>zubairov</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[un/edifact]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=607</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/03/02/new-feature-for-edi-parser-namespaces-support/';
var dzone_title = 'New feature for EDI Parser &#8211; Namespaces support';
var dzone_blurb = 'Our work on EDI and UN/EDIFACT support for the next Smooks release continiues. Now we have a namespace support in EDI and UN/EDIFACT generated XML events.  See...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/03/02/new-feature-for-edi-parser-namespaces-support/';
var dzone_title = 'New feature for EDI Parser &#8211; Namespaces support';
var dzone_blurb = 'Our work on EDI and UN/EDIFACT support for the next Smooks release continiues. Now we have a namespace support in EDI and UN/EDIFACT generated XML events.  See...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Our work on EDI and UN/EDIFACT support for the next Smooks release continiues. Now we have a namespace support in EDI and UN/EDIFACT generated XML events.  See <a href="http://zubairov.posterous.com/namespaces-for-unedifact-in-smooks" target="_blank">my blog post</a> for more information and examples on how you could use it.</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/uncategorized/">Uncategorized</a> by Zubairov <a href="http://blog.smooks.org/2011/03/02/new-feature-for-edi-parser-namespaces-support/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/03/02/new-feature-for-edi-parser-namespaces-support/';
var dzone_title = 'New feature for EDI Parser &#8211; Namespaces support';
var dzone_blurb = 'Our work on EDI and UN/EDIFACT support for the next Smooks release continiues. Now we have a namespace support in EDI and UN/EDIFACT generated XML events.  See...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Our work on EDI and UN/EDIFACT support for the next Smooks release continiues. Now we have a namespace support in EDI and UN/EDIFACT generated XML events.  See <a href="http://zubairov.posterous.com/namespaces-for-unedifact-in-smooks" target="_blank">my blog post</a> for more information and examples on how you could use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2011/03/02/new-feature-for-edi-parser-namespaces-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smooks OSGI: Camel, UN/EDIFACT, ServiceMix</title>
		<link>http://blog.smooks.org/2011/02/19/smooks-osgi-revisited/</link>
		<comments>http://blog.smooks.org/2011/02/19/smooks-osgi-revisited/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 13:44:14 +0000</pubDate>
		<dc:creator>Daniel Bevenius</dc:creator>
				<category><![CDATA[Camel]]></category>
		<category><![CDATA[EDI]]></category>
		<category><![CDATA[Smooks]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=571</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/02/19/smooks-osgi-revisited/';
var dzone_title = 'Smooks OSGI: Camel, UN/EDIFACT, ServiceMix';
var dzone_blurb = 'This post is about the work we have done to improve Smooks OSGI integration. With Smooks 1.4 we added support for OSGI in the form of making the smooks-all.jar...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/02/19/smooks-osgi-revisited/';
var dzone_title = 'Smooks OSGI: Camel, UN/EDIFACT, ServiceMix';
var dzone_blurb = 'This post is about the work we have done to improve Smooks OSGI integration. With Smooks 1.4 we added support for OSGI in the form of making the smooks-all.jar...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>This post is about the work we have done to improve Smooks OSGI integration. </p>
<p>With Smooks 1.4 we added support for OSGI in the form of making the smooks-all.jar into a bundle. This jar contains all the Smooks classes and resources and is a convenience jar that can be used if you don&#8217;t want to keep track of all the individual jars that make up Smooks. During this work we also added a few classes to make Smooks work well inside an OSGI container.</p>
<p>For some background and more details about the Smooks-OSGI work please take a look at this <a href="http://www.smooks.org/mediawiki/index.php?title=SmooksOsgi">wiki page</a>.</p>
<p><strong>Using Smooks in an OSGI Container (with Camel and ServiceMix)</strong><br />
With 1.4 we added Camel support which has had OSGI support for a long time. We added a few basic examples but it turned out that this was not the best solution. The solution in 1.4 required users to explicitly specify the packages the client bundle required and this made maintenance difficult.<br />
Using Smooks in Camel should not require anything more then declaring that the client bundle uses Camel and perhaps Spring. Client bundles now only need to declare that they import packages for Camel, for example:</p>
<pre class="brush: plain; wrap-lines: true; toolbar: false">
Manifest-Version: 1.0
Export-Package: example;uses:="org.apache.camel,
    org.springframework.context.support,
    org.springframework.context"
Bundle-Version: 1.0
Bundle-Name: Milyn Smooks Example - Smooks Camel CVS to XML
Bundle-ManifestVersion: 2
Import-Package:
    example,org.apache.camel;version="2.6",
    org.springframework.context;version="1.2.0",
    org.springframework.context.support;version="1.2.0"
Bundle-SymbolicName: milyn-smooks-example-camel-csv-to-xml
</pre>
<p><strong>Simplified deployment to ServiceMix</strong><br />
ServiceMix users will hopefully be glad to know that we now generate a features.xml file for easy deployment into service mix. A features.xml specifies all the bundles that a feature need and can be installed/uninstalled as a single unit.<br />
For example, to install the Smooks bundle you can use the following commands:<br />
<code><br />
karaf@root> features:addUrl mvn:org.milyn/milyn-smooks-all/1.5-SNAPSHOT/xml/features<br />
karaf@root> features:install smooks<br />
</code></p>
<p><strong>UN/EDIFACT</strong><br />
Smooks has UN/EDIFACT support which includes pre-generated artifacts that are available in <a href="http://mvnrepository.com/artifact/org.milyn.edi.unedifact">maven</a>.  As part of the OSGi work, we have modified these artifacts so as to make them OSGi fragment bundles</p>
<p>Users can now install the mappings and binding as fragment bundles and these will attach to a specific version of the Smooks bundle. This is what this looks like running in Apache ServiceMix 4.3.0.1-fuse:<br />
<code><br />
[ 430] [Active     ] [            ] [       ] [   60] Smooks OSGi (1.5.0.SNAPSHOT)<br />
                                       Fragments: 439,441<br />
[ 439] [Resolved   ] [            ] [       ] [   60] Smooks EDI - UN/EDIFACT - D96A - Bindings (1.4)<br />
                                       Hosts: 430<br />
[ 441] [Resolved   ] [            ] [       ] [   60] Smooks EDI - UN/EDIFACT - D96A - Mapping Model (1.4)<br />
                                       Hosts: 430<br />
[ 448] [Active     ] [            ] [Started] [   60] Milyn Smooks Example - Smooks Camel UNEDIFACT to String (1.0)<br />
</code><br />
Above we can see that the binding (id=439) and the mapping (id=441) have been attached to the Smooks bundle (id=420). More fragment bundles can be attached as required and you can attach the same fragment to different version of the Smooks bundle since we specify a version on the Fragment-Host header. </p>
<p>As mentioned earlier in this post you can find more information and details about this work on this <a href="http://www.smooks.org/mediawiki/index.php?title=SmooksOsgi">wiki page</a>.</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/camel/">Camel</a> by Daniel Bevenius <a href="http://blog.smooks.org/2011/02/19/smooks-osgi-revisited/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/02/19/smooks-osgi-revisited/';
var dzone_title = 'Smooks OSGI: Camel, UN/EDIFACT, ServiceMix';
var dzone_blurb = 'This post is about the work we have done to improve Smooks OSGI integration. With Smooks 1.4 we added support for OSGI in the form of making the smooks-all.jar...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>This post is about the work we have done to improve Smooks OSGI integration. </p>
<p>With Smooks 1.4 we added support for OSGI in the form of making the smooks-all.jar into a bundle. This jar contains all the Smooks classes and resources and is a convenience jar that can be used if you don&#8217;t want to keep track of all the individual jars that make up Smooks. During this work we also added a few classes to make Smooks work well inside an OSGI container.</p>
<p>For some background and more details about the Smooks-OSGI work please take a look at this <a href="http://www.smooks.org/mediawiki/index.php?title=SmooksOsgi">wiki page</a>.</p>
<p><strong>Using Smooks in an OSGI Container (with Camel and ServiceMix)</strong><br />
With 1.4 we added Camel support which has had OSGI support for a long time. We added a few basic examples but it turned out that this was not the best solution. The solution in 1.4 required users to explicitly specify the packages the client bundle required and this made maintenance difficult.<br />
Using Smooks in Camel should not require anything more then declaring that the client bundle uses Camel and perhaps Spring. Client bundles now only need to declare that they import packages for Camel, for example:</p>
<pre class="brush: plain; wrap-lines: true; toolbar: false">
Manifest-Version: 1.0
Export-Package: example;uses:="org.apache.camel,
    org.springframework.context.support,
    org.springframework.context"
Bundle-Version: 1.0
Bundle-Name: Milyn Smooks Example - Smooks Camel CVS to XML
Bundle-ManifestVersion: 2
Import-Package:
    example,org.apache.camel;version="2.6",
    org.springframework.context;version="1.2.0",
    org.springframework.context.support;version="1.2.0"
Bundle-SymbolicName: milyn-smooks-example-camel-csv-to-xml
</pre>
<p><strong>Simplified deployment to ServiceMix</strong><br />
ServiceMix users will hopefully be glad to know that we now generate a features.xml file for easy deployment into service mix. A features.xml specifies all the bundles that a feature need and can be installed/uninstalled as a single unit.<br />
For example, to install the Smooks bundle you can use the following commands:<br />
<code><br />
karaf@root> features:addUrl mvn:org.milyn/milyn-smooks-all/1.5-SNAPSHOT/xml/features<br />
karaf@root> features:install smooks<br />
</code></p>
<p><strong>UN/EDIFACT</strong><br />
Smooks has UN/EDIFACT support which includes pre-generated artifacts that are available in <a href="http://mvnrepository.com/artifact/org.milyn.edi.unedifact">maven</a>.  As part of the OSGi work, we have modified these artifacts so as to make them OSGi fragment bundles</p>
<p>Users can now install the mappings and binding as fragment bundles and these will attach to a specific version of the Smooks bundle. This is what this looks like running in Apache ServiceMix 4.3.0.1-fuse:<br />
<code><br />
[ 430] [Active     ] [            ] [       ] [   60] Smooks OSGi (1.5.0.SNAPSHOT)<br />
                                       Fragments: 439,441<br />
[ 439] [Resolved   ] [            ] [       ] [   60] Smooks EDI - UN/EDIFACT - D96A - Bindings (1.4)<br />
                                       Hosts: 430<br />
[ 441] [Resolved   ] [            ] [       ] [   60] Smooks EDI - UN/EDIFACT - D96A - Mapping Model (1.4)<br />
                                       Hosts: 430<br />
[ 448] [Active     ] [            ] [Started] [   60] Milyn Smooks Example - Smooks Camel UNEDIFACT to String (1.0)<br />
</code><br />
Above we can see that the binding (id=439) and the mapping (id=441) have been attached to the Smooks bundle (id=420). More fragment bundles can be attached as required and you can attach the same fragment to different version of the Smooks bundle since we specify a version on the Fragment-Host header. </p>
<p>As mentioned earlier in this post you can find more information and details about this work on this <a href="http://www.smooks.org/mediawiki/index.php?title=SmooksOsgi">wiki page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2011/02/19/smooks-osgi-revisited/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>At long last&#8230; Smooks v1.4&#8230;</title>
		<link>http://blog.smooks.org/2011/01/19/at-long-last-smooks-v1-4/</link>
		<comments>http://blog.smooks.org/2011/01/19/at-long-last-smooks-v1-4/#comments</comments>
		<pubDate>Wed, 19 Jan 2011 17:17:01 +0000</pubDate>
		<dc:creator>Tom Fennelly</dc:creator>
				<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=565</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/01/19/at-long-last-smooks-v1-4/';
var dzone_title = 'At long last&#8230; Smooks v1.4&#8230;';
var dzone_blurb = 'We&#8217;re glad to announce the release of Smooks v1.4.  v1.4 has been a  long time in the making and has a ton of new features and fixes.  I want to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/01/19/at-long-last-smooks-v1-4/';
var dzone_title = 'At long last&#8230; Smooks v1.4&#8230;';
var dzone_blurb = 'We&#8217;re glad to announce the release of Smooks v1.4.  v1.4 has been a  long time in the making and has a ton of new features and fixes.  I want to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>We&#8217;re glad to announce the release of Smooks v1.4.  v1.4 has been a  long time in the making and has a ton of new features and fixes.  I want to thank everyone that contributed to this release (I think I  listed all in the above link&#8230; sorry if I missed anyone).  Without  the contributions of these people, most of the features in Smooks v1.4  would not exist.</p>
<p>As well as 85+ bug fixes, Smooks v1.4 includes the following new highlight features:</p>
<ul>
<li> EDI:
<ul>
<li> <a title="V1.4:Smooks v1.4 User Guide" href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#UN.2FEDIFACT">Out of the box support for UN/EDIFACT Interchange messages</a>.  (By: <em>Bård Langoy, Renat Zubairov, Tom</em>)</li>
<li> Allow the EDIParser (by explicit configuration) to ignore unmapped fields.  (By: <em>Christian Bach</em>)</li>
<li> Added EDI Ojbect Serialization to EJC generated POJOs.  (By: <em>Tom</em>)</li>
<li> Support for UN/EDIFACT UNA Decimal Point specification.  (By:  <em>Nicolas Blanc</em>)</li>
</ul>
</li>
<li> <a title="https://github.com/smooks/smooks/tree/v1.4/smooks-examples/dynamic-model-builder" rel="nofollow" href="https://github.com/smooks/smooks/tree/v1.4/smooks-examples/dynamic-model-builder">A Dynamic Model Builder</a> that allows you to process evolving configuration namespaces.  Supports model reading and writing.  (By: <em>Tom</em>)</li>
<li> Support for reading YAML messages.  (By: <em>Maurice Zeijen</em>)</li>
<li> Create an OSGi compatible &#8220;smooks-all&#8221; module that assembles all smooks jars into a single jar.  (By: <em>Daniel Bevenius, Tom</em>)</li>
<li> <a title="V1.4:Smooks v1.4 User Guide" href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Apache_Camel_Integration">Apache Camel Integration</a>.  (By: <em>Daniel Bevenius</em>)</li>
<li> <a title="V1.4:Smooks v1.4 User Guide" href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Number_Decoding">NumberFormat support for Numeric DataDecoders</a>.  (By: <em>Tom</em>)</li>
<li> Support for bean wiring by bean type and bean annotation.  (By: <em>Tom</em>)</li>
<li> <a title="V1.4:Smooks v1.4 User Guide" href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Simple_Stream_Manipulations">Simple event stream manipulation actions</a> for renaming/removing elements/attributes.  (By: <em>Tom</em>)</li>
<li> Restructured and easier to use User Guide.  (By: <em>Maurice Zeijen</em>)</li>
<li> Restructured and easier to use Examples page.  (By: <em>Tom</em>)</li>
<li> &#8230; <em><strong><a title="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15886" rel="nofollow" href="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15886">See full list of Fixes and Features</a></strong></em></li>
</ul>
<p><span><a title="http://smooks.org/mediawiki/index.php?title=Downloads" rel="nofollow" href="http://smooks.org/mediawiki/index.php?title=Downloads"><img src="http://smooks.org/mediawiki/images/d/d0/Download_button.gif" alt="Download_button.gif" /></a></span></p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/release/">Release</a> by Tom Fennelly <a href="http://blog.smooks.org/2011/01/19/at-long-last-smooks-v1-4/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2011/01/19/at-long-last-smooks-v1-4/';
var dzone_title = 'At long last&#8230; Smooks v1.4&#8230;';
var dzone_blurb = 'We&#8217;re glad to announce the release of Smooks v1.4.  v1.4 has been a  long time in the making and has a ton of new features and fixes.  I want to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>We&#8217;re glad to announce the release of Smooks v1.4.  v1.4 has been a  long time in the making and has a ton of new features and fixes.  I want to thank everyone that contributed to this release (I think I  listed all in the above link&#8230; sorry if I missed anyone).  Without  the contributions of these people, most of the features in Smooks v1.4  would not exist.</p>
<p>As well as 85+ bug fixes, Smooks v1.4 includes the following new highlight features:</p>
<ul>
<li> EDI:
<ul>
<li> <a title="V1.4:Smooks v1.4 User Guide" href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#UN.2FEDIFACT">Out of the box support for UN/EDIFACT Interchange messages</a>.  (By: <em>Bård Langoy, Renat Zubairov, Tom</em>)</li>
<li> Allow the EDIParser (by explicit configuration) to ignore unmapped fields.  (By: <em>Christian Bach</em>)</li>
<li> Added EDI Ojbect Serialization to EJC generated POJOs.  (By: <em>Tom</em>)</li>
<li> Support for UN/EDIFACT UNA Decimal Point specification.  (By:  <em>Nicolas Blanc</em>)</li>
</ul>
</li>
<li> <a title="https://github.com/smooks/smooks/tree/v1.4/smooks-examples/dynamic-model-builder" rel="nofollow" href="https://github.com/smooks/smooks/tree/v1.4/smooks-examples/dynamic-model-builder">A Dynamic Model Builder</a> that allows you to process evolving configuration namespaces.  Supports model reading and writing.  (By: <em>Tom</em>)</li>
<li> Support for reading YAML messages.  (By: <em>Maurice Zeijen</em>)</li>
<li> Create an OSGi compatible &#8220;smooks-all&#8221; module that assembles all smooks jars into a single jar.  (By: <em>Daniel Bevenius, Tom</em>)</li>
<li> <a title="V1.4:Smooks v1.4 User Guide" href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Apache_Camel_Integration">Apache Camel Integration</a>.  (By: <em>Daniel Bevenius</em>)</li>
<li> <a title="V1.4:Smooks v1.4 User Guide" href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Number_Decoding">NumberFormat support for Numeric DataDecoders</a>.  (By: <em>Tom</em>)</li>
<li> Support for bean wiring by bean type and bean annotation.  (By: <em>Tom</em>)</li>
<li> <a title="V1.4:Smooks v1.4 User Guide" href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Simple_Stream_Manipulations">Simple event stream manipulation actions</a> for renaming/removing elements/attributes.  (By: <em>Tom</em>)</li>
<li> Restructured and easier to use User Guide.  (By: <em>Maurice Zeijen</em>)</li>
<li> Restructured and easier to use Examples page.  (By: <em>Tom</em>)</li>
<li> &#8230; <em><strong><a title="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15886" rel="nofollow" href="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15886">See full list of Fixes and Features</a></strong></em></li>
</ul>
<p><span><a title="http://smooks.org/mediawiki/index.php?title=Downloads" rel="nofollow" href="http://smooks.org/mediawiki/index.php?title=Downloads"><img src="http://smooks.org/mediawiki/images/d/d0/Download_button.gif" alt="Download_button.gif" /></a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2011/01/19/at-long-last-smooks-v1-4/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Splitting and Routing UN/EDIFACT Interchanges using Smooks and Apache Camel</title>
		<link>http://blog.smooks.org/2010/10/27/splitting-and-routing-unedifact-interchanges-using-smooks-and-apache-camel/</link>
		<comments>http://blog.smooks.org/2010/10/27/splitting-and-routing-unedifact-interchanges-using-smooks-and-apache-camel/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 15:00:40 +0000</pubDate>
		<dc:creator>Tom Fennelly</dc:creator>
				<category><![CDATA[Camel]]></category>
		<category><![CDATA[EDI]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=560</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/10/27/splitting-and-routing-unedifact-interchanges-using-smooks-and-apache-camel/';
var dzone_title = 'Splitting and Routing UN/EDIFACT Interchanges using Smooks and Apache Camel';
var dzone_blurb = 'Two of the main new features in Smooks v1.4 are, out of the box support for UN/EDIFACT Interchanges, and Apache Camel integration.The new UN/EDIFACT support...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/10/27/splitting-and-routing-unedifact-interchanges-using-smooks-and-apache-camel/';
var dzone_title = 'Splitting and Routing UN/EDIFACT Interchanges using Smooks and Apache Camel';
var dzone_blurb = 'Two of the main new features in Smooks v1.4 are, out of the box support for UN/EDIFACT Interchanges, and Apache Camel integration.The new UN/EDIFACT support...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Two of the main new features in Smooks v1.4 are, out of the box support for <strong>UN/EDIFACT</strong> Interchanges, and <strong>Apache Camel</strong> integration.</p>
<p>The new <strong>UN/EDIFACT</strong> support allows you to process UN/EDIFACT Interchanges by either or both of the following methods:</p>
<ol>
<li>Conversion to <strong>XML</strong>, allowing you to use standard XML tools (or other Smooks extensions) for further processing.</li>
<li>Binding the interchange message data into <strong>pre-built Java object models</strong>, or custom models if you prefer to use your own.</li>
</ol>
<p>All the required artifacts for reading any of the UN/EDIFACT directories (and converting to XML) are available in Maven, as are all of the pre-built Java Object models for all the messages defined in all of the UN/EDIFACT directories.  To use them, all you need to do is include the appropriate artifacts into your project.  <a href="http://www.smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#UN.2FEDIFACT">See the User Guide</a>.</p>
<p>The new <strong>Apache Camel</strong> integration allows you to hook Smooks into your Camel routes as a Camel Component or Camel DataFormat.  Another important part of the Camel integration are the Smooks extensions that allow you to perform inline routing of Smooks BeanContext data to Camel endpoints i.e. you can also process huge (GB+) data streams.</p>
<p>Putting these two new capabilities together allows us to provide some interesting functionality with respect to Splitting and Routing UN/EDIFACT message Interchanges.  We use Smooks to perform the reading, conversion (to XML and/or Java) and splitting of the interchanges and then use Camel to to perform the inline routing of the Java or XML (using the new Camel extensions for Smooks).</p>
<p>We created an example that demonstrates this capability:</p>
<ul>
<li><a href="http://www.screencast.com/t/Pm3eAIR8DSd"><em><strong>See the Screencast</strong></em></a>.</li>
<li><em><strong><a href="http://smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#Apache_Camel">Get the code</a></strong></em> and try it yourself (the &#8220;splitting-camel&#8221; example).</li>
</ul>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/camel/">Camel</a> by Tom Fennelly <a href="http://blog.smooks.org/2010/10/27/splitting-and-routing-unedifact-interchanges-using-smooks-and-apache-camel/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/10/27/splitting-and-routing-unedifact-interchanges-using-smooks-and-apache-camel/';
var dzone_title = 'Splitting and Routing UN/EDIFACT Interchanges using Smooks and Apache Camel';
var dzone_blurb = 'Two of the main new features in Smooks v1.4 are, out of the box support for UN/EDIFACT Interchanges, and Apache Camel integration.The new UN/EDIFACT support...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Two of the main new features in Smooks v1.4 are, out of the box support for <strong>UN/EDIFACT</strong> Interchanges, and <strong>Apache Camel</strong> integration.</p>
<p>The new <strong>UN/EDIFACT</strong> support allows you to process UN/EDIFACT Interchanges by either or both of the following methods:</p>
<ol>
<li>Conversion to <strong>XML</strong>, allowing you to use standard XML tools (or other Smooks extensions) for further processing.</li>
<li>Binding the interchange message data into <strong>pre-built Java object models</strong>, or custom models if you prefer to use your own.</li>
</ol>
<p>All the required artifacts for reading any of the UN/EDIFACT directories (and converting to XML) are available in Maven, as are all of the pre-built Java Object models for all the messages defined in all of the UN/EDIFACT directories.  To use them, all you need to do is include the appropriate artifacts into your project.  <a href="http://www.smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#UN.2FEDIFACT">See the User Guide</a>.</p>
<p>The new <strong>Apache Camel</strong> integration allows you to hook Smooks into your Camel routes as a Camel Component or Camel DataFormat.  Another important part of the Camel integration are the Smooks extensions that allow you to perform inline routing of Smooks BeanContext data to Camel endpoints i.e. you can also process huge (GB+) data streams.</p>
<p>Putting these two new capabilities together allows us to provide some interesting functionality with respect to Splitting and Routing UN/EDIFACT message Interchanges.  We use Smooks to perform the reading, conversion (to XML and/or Java) and splitting of the interchanges and then use Camel to to perform the inline routing of the Java or XML (using the new Camel extensions for Smooks).</p>
<p>We created an example that demonstrates this capability:</p>
<ul>
<li><a href="http://www.screencast.com/t/Pm3eAIR8DSd"><em><strong>See the Screencast</strong></em></a>.</li>
<li><em><strong><a href="http://smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#Apache_Camel">Get the code</a></strong></em> and try it yourself (the &#8220;splitting-camel&#8221; example).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/10/27/splitting-and-routing-unedifact-interchanges-using-smooks-and-apache-camel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Smooks v1.4 Beta1 available for download</title>
		<link>http://blog.smooks.org/2010/10/26/smooks-v1-4-beta1-available-for-download/</link>
		<comments>http://blog.smooks.org/2010/10/26/smooks-v1-4-beta1-available-for-download/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 21:48:23 +0000</pubDate>
		<dc:creator>Tom Fennelly</dc:creator>
				<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=554</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/10/26/smooks-v1-4-beta1-available-for-download/';
var dzone_title = 'Smooks v1.4 Beta1 available for download';
var dzone_blurb = 'At last we&#8217;re nearly there with v1.4.   As well as 85+ bug fixes, Smooks v1.4 includes the following new highlight features: Out of the box support...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/10/26/smooks-v1-4-beta1-available-for-download/';
var dzone_title = 'Smooks v1.4 Beta1 available for download';
var dzone_blurb = 'At last we&#8217;re nearly there with v1.4.   As well as 85+ bug fixes, Smooks v1.4 includes the following new highlight features: Out of the box support...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>At last we&#8217;re nearly there with v1.4.   As well as 85+ bug fixes, Smooks v1.4 includes the following new highlight features:</p>
<ul>
<li> <strong>Out of the box support for UN/EDIFACT</strong> Interchange message.  <a href="http://www.smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#UN.2FEDIFACT">See Examples</a>.</li>
<li> <strong>Apache Camel Integration</strong>.  <a href="http://www.smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#Apache_Camel">See Examples</a>.</li>
<li> A <strong>Dynamic Model Builder</strong> that&#8217;s very handy for dealing with complex evolving configuration namespaces on top of a single Java Object Model.  Supports model reading and writing.  <a href="http://www.smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#Dynamic_Model_Builder">See Examples</a>.</li>
</ul>
<p>But that&#8217;s not all by any means.  <em><strong><a title="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15886" rel="nofollow" href="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15886">See here for a full list of Fixes and Features</a></strong></em></p>
<p><em><strong><span style="color: #0000ff;"><a href="http://www.smooks.org/mediawiki/index.php?title=Downloads">Download</a></span><br />
</strong></em></p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/release/">Release</a> by Tom Fennelly <a href="http://blog.smooks.org/2010/10/26/smooks-v1-4-beta1-available-for-download/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/10/26/smooks-v1-4-beta1-available-for-download/';
var dzone_title = 'Smooks v1.4 Beta1 available for download';
var dzone_blurb = 'At last we&#8217;re nearly there with v1.4.   As well as 85+ bug fixes, Smooks v1.4 includes the following new highlight features: Out of the box support...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>At last we&#8217;re nearly there with v1.4.   As well as 85+ bug fixes, Smooks v1.4 includes the following new highlight features:</p>
<ul>
<li> <strong>Out of the box support for UN/EDIFACT</strong> Interchange message.  <a href="http://www.smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#UN.2FEDIFACT">See Examples</a>.</li>
<li> <strong>Apache Camel Integration</strong>.  <a href="http://www.smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#Apache_Camel">See Examples</a>.</li>
<li> A <strong>Dynamic Model Builder</strong> that&#8217;s very handy for dealing with complex evolving configuration namespaces on top of a single Java Object Model.  Supports model reading and writing.  <a href="http://www.smooks.org/mediawiki/index.php?title=Smooks_v1.4_Examples#Dynamic_Model_Builder">See Examples</a>.</li>
</ul>
<p>But that&#8217;s not all by any means.  <em><strong><a title="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15886" rel="nofollow" href="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15886">See here for a full list of Fixes and Features</a></strong></em></p>
<p><em><strong><span style="color: #0000ff;"><a href="http://www.smooks.org/mediawiki/index.php?title=Downloads">Download</a></span><br />
</strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/10/26/smooks-v1-4-beta1-available-for-download/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Smooks-Camel integration revisited</title>
		<link>http://blog.smooks.org/2010/09/23/smooks-camel-integration-revisited/</link>
		<comments>http://blog.smooks.org/2010/09/23/smooks-camel-integration-revisited/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 09:43:14 +0000</pubDate>
		<dc:creator>Daniel Bevenius</dc:creator>
				<category><![CDATA[Camel]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=507</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/09/23/smooks-camel-integration-revisited/';
var dzone_title = 'Smooks-Camel integration revisited';
var dzone_blurb = 'This entry is about the work we have done integrating Smooks with Apache Camel for Smooks v1.4.  With this tighter integration of these frameworks, you...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/09/23/smooks-camel-integration-revisited/';
var dzone_title = 'Smooks-Camel integration revisited';
var dzone_blurb = 'This entry is about the work we have done integrating Smooks with Apache Camel for Smooks v1.4.  With this tighter integration of these frameworks, you...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>This entry is about the work we have done integrating <a href="http://www.smooks.org">Smooks</a> with <a href="http://camel.apache.org/">Apache Camel</a> for Smooks v1.4.  With this tighter integration of these frameworks, you can leverage the power of <a href="http://www.smooks.org">Smooks</a> to process/transform a wide range of data types, with the power of <a href="http://camel.apache.org/">Apache Camel</a> to route data to a huge range of endpoint  types.</p>
<p>Tom started this work a long time ago and got feedback from Claus Ibsen, which Tom implemented. Later Christian Mueller improved the code and I&#8217;ve continued working on that code base.</p>
<p>When it comes to using Smooks in Camel there are three options of usage:</p>
<p><strong>1. SmooksComponent<br />
</strong>The SmooksComponent is a Camel component which can be used in a Camel route like this:</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">from("file://inputDir?noop=true")
.to("smooks://smooks-config.xml")
.to("jms:queue:order")</pre>
<p>This route will read files from the &#8216;inputDir&#8217; directory and pass the contents of those files to the Smooks Component. The file will be automatically converted into an instance of javax.xml.transform.stream.StreamSource. TypeConversion is a built-in Camel feature that you can read more about <a href="http://camel.apache.org/type-converter.html">here</a>.</p>
<p>So we know what the source type is but how about the Result type we want Smooks to produce? If you have been following the latest blog posts you might have already guessed that the type(s) are configured in &#8217;smooks-config.xml&#8217; as described in this <a href="http://blog.smooks.org/2010/09/14/camel-integration-and-new-smooks-configuration-element/">blog post</a>.</p>
<p>Using the SmooksComponent you can use all the features from Smooks including routing to Camel endpoints. This enables fragments to be routed during transformation.  This means that the routing can be performed as the message is being filtered Vs as a batch operation after filtering the message, making it easier to handle large/huge message streams.</p>
<p>Here is an example of routing to camel endpoints using Smooks:</p>
<pre class="brush: xml">&lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
         xmlns:camel="http://www.milyn.org/xsd/smooks/camel-1.4.xsd"&gt;

  &lt;!-- Create some bean instances from the input source... --&gt;
  &lt;jb:bean beanId="orderItem"  ... "&gt;
    &lt;!-- etc... See Smooks Java Binding docs --&gt;
  &lt;/jb:bean&gt;

  &lt;!-- Route bean to camel endpoints... --&gt;
  &lt;camel:route beanid="orderItem"&gt;
    &lt;camel:to endpoint="direct:slow" if="orderItem.priority == 'Normal'" /&gt;
    &lt;camel:to endpoint="direct:express" if="orderItem.priority == 'High'" /&gt;
  &lt;/camel:route&gt;

&lt;/smooks-resource-list&gt;</pre>
<p>In the above example, we route Java Beans from the Smooks BeanContext to the Camel Endpoints.  Note that you can also apply templates (e.g. FreeMarker) to these same beans and route the templating result instead of beans (e.g. as XML, CSV or other).</p>
<p>The above configuration shows routing using the &#8216;beanId&#8217; attribute.  It is also possible to route using an attribute named &#8216;routeOnElement&#8217; For more information about Smooks routing please consult the <a href="http://www.smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Routing_Output_Data">Smooks User Guide</a>.</p>
<p>The SmooksComponent delegates most of its work to SmooksProcessor which will be described next.</p>
<p><strong>2. SmooksProcessor<br />
</strong>Using Smooks Processor gives you full control over Smooks, for example if you want to programatically create the underlying Smooks instance you&#8217;d use the SmooksProcessor. Below is an example of using the SmooksProcessor in a Camel route:</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">Smooks smooks = new Smooks("edi-to-xml-smooks-config.xml");
...
SmooksProcessor processor = new SmooksProcessor(smooks, context);
from("file://input?noop=true").process(processor).
.to("mock:result");</pre>
<p><strong>3. SmooksDataFormat<br />
</strong>SmooksDataFormat is a Camel DataFormat which is capable of transforming from one dataformat to another and back again. You would use this when you are only interested in transforming from one format to another and not interested in other Smooks features.</p>
<p>Below is an example of using SmooksDataFormat to transform a comma separated value string into a java.util.List of Customer object instances:</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">SmooksDataFormat sdf = new SmooksDataFormat("csv-smooks-unmarshal-config.xml");
from("direct:unmarshal")
.unmarshal(sdf).convertBodyTo(List.class)
.to("mock:result");</pre>
<p><strong>4. Examples</strong></p>
<p>There are currently two very basic examples that demonstrate the usage of Smooks-Camel integration:<br />
1. <a href="https://svn.codehaus.org/milyn/trunk/smooks-examples/camel/camel-dataformat">camel-dataformat</a> (see note below)<br />
2. <a href="https://svn.codehaus.org/milyn/trunk/smooks-examples/camel/camel-integration">camel-integration</a> (see note below)</p>
<p style="padding-left: 30px;"><strong>Note on Examples: </strong><em>You must <a href="https://svn.codehaus.org/milyn/trunk/smooks-examples/">checkout and build all examples</a> before running the Camel examples.</em></p>
<p>Tom is working on a really interesting example of using UN-EDIFACT in combination with Camel and will be added shortly.</p>
<p>Thanks,</p>
<p>/Daniel</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/camel/">Camel</a> by Daniel Bevenius <a href="http://blog.smooks.org/2010/09/23/smooks-camel-integration-revisited/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/09/23/smooks-camel-integration-revisited/';
var dzone_title = 'Smooks-Camel integration revisited';
var dzone_blurb = 'This entry is about the work we have done integrating Smooks with Apache Camel for Smooks v1.4.  With this tighter integration of these frameworks, you...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>This entry is about the work we have done integrating <a href="http://www.smooks.org">Smooks</a> with <a href="http://camel.apache.org/">Apache Camel</a> for Smooks v1.4.  With this tighter integration of these frameworks, you can leverage the power of <a href="http://www.smooks.org">Smooks</a> to process/transform a wide range of data types, with the power of <a href="http://camel.apache.org/">Apache Camel</a> to route data to a huge range of endpoint  types.</p>
<p>Tom started this work a long time ago and got feedback from Claus Ibsen, which Tom implemented. Later Christian Mueller improved the code and I&#8217;ve continued working on that code base.</p>
<p>When it comes to using Smooks in Camel there are three options of usage:</p>
<p><strong>1. SmooksComponent<br />
</strong>The SmooksComponent is a Camel component which can be used in a Camel route like this:</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">from("file://inputDir?noop=true")
.to("smooks://smooks-config.xml")
.to("jms:queue:order")</pre>
<p>This route will read files from the &#8216;inputDir&#8217; directory and pass the contents of those files to the Smooks Component. The file will be automatically converted into an instance of javax.xml.transform.stream.StreamSource. TypeConversion is a built-in Camel feature that you can read more about <a href="http://camel.apache.org/type-converter.html">here</a>.</p>
<p>So we know what the source type is but how about the Result type we want Smooks to produce? If you have been following the latest blog posts you might have already guessed that the type(s) are configured in &#8217;smooks-config.xml&#8217; as described in this <a href="http://blog.smooks.org/2010/09/14/camel-integration-and-new-smooks-configuration-element/">blog post</a>.</p>
<p>Using the SmooksComponent you can use all the features from Smooks including routing to Camel endpoints. This enables fragments to be routed during transformation.  This means that the routing can be performed as the message is being filtered Vs as a batch operation after filtering the message, making it easier to handle large/huge message streams.</p>
<p>Here is an example of routing to camel endpoints using Smooks:</p>
<pre class="brush: xml">&lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
         xmlns:camel="http://www.milyn.org/xsd/smooks/camel-1.4.xsd"&gt;

  &lt;!-- Create some bean instances from the input source... --&gt;
  &lt;jb:bean beanId="orderItem"  ... "&gt;
    &lt;!-- etc... See Smooks Java Binding docs --&gt;
  &lt;/jb:bean&gt;

  &lt;!-- Route bean to camel endpoints... --&gt;
  &lt;camel:route beanid="orderItem"&gt;
    &lt;camel:to endpoint="direct:slow" if="orderItem.priority == 'Normal'" /&gt;
    &lt;camel:to endpoint="direct:express" if="orderItem.priority == 'High'" /&gt;
  &lt;/camel:route&gt;

&lt;/smooks-resource-list&gt;</pre>
<p>In the above example, we route Java Beans from the Smooks BeanContext to the Camel Endpoints.  Note that you can also apply templates (e.g. FreeMarker) to these same beans and route the templating result instead of beans (e.g. as XML, CSV or other).</p>
<p>The above configuration shows routing using the &#8216;beanId&#8217; attribute.  It is also possible to route using an attribute named &#8216;routeOnElement&#8217; For more information about Smooks routing please consult the <a href="http://www.smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Routing_Output_Data">Smooks User Guide</a>.</p>
<p>The SmooksComponent delegates most of its work to SmooksProcessor which will be described next.</p>
<p><strong>2. SmooksProcessor<br />
</strong>Using Smooks Processor gives you full control over Smooks, for example if you want to programatically create the underlying Smooks instance you&#8217;d use the SmooksProcessor. Below is an example of using the SmooksProcessor in a Camel route:</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">Smooks smooks = new Smooks("edi-to-xml-smooks-config.xml");
...
SmooksProcessor processor = new SmooksProcessor(smooks, context);
from("file://input?noop=true").process(processor).
.to("mock:result");</pre>
<p><strong>3. SmooksDataFormat<br />
</strong>SmooksDataFormat is a Camel DataFormat which is capable of transforming from one dataformat to another and back again. You would use this when you are only interested in transforming from one format to another and not interested in other Smooks features.</p>
<p>Below is an example of using SmooksDataFormat to transform a comma separated value string into a java.util.List of Customer object instances:</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">SmooksDataFormat sdf = new SmooksDataFormat("csv-smooks-unmarshal-config.xml");
from("direct:unmarshal")
.unmarshal(sdf).convertBodyTo(List.class)
.to("mock:result");</pre>
<p><strong>4. Examples</strong></p>
<p>There are currently two very basic examples that demonstrate the usage of Smooks-Camel integration:<br />
1. <a href="https://svn.codehaus.org/milyn/trunk/smooks-examples/camel/camel-dataformat">camel-dataformat</a> (see note below)<br />
2. <a href="https://svn.codehaus.org/milyn/trunk/smooks-examples/camel/camel-integration">camel-integration</a> (see note below)</p>
<p style="padding-left: 30px;"><strong>Note on Examples: </strong><em>You must <a href="https://svn.codehaus.org/milyn/trunk/smooks-examples/">checkout and build all examples</a> before running the Camel examples.</em></p>
<p>Tom is working on a really interesting example of using UN-EDIFACT in combination with Camel and will be added shortly.</p>
<p>Thanks,</p>
<p>/Daniel</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/09/23/smooks-camel-integration-revisited/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
