<?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 &#187; EDI</title>
	<atom:link href="http://blog.smooks.org/category/smooks/edi/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 &#187; EDI</title>
		<url>http://blog.smooks.org/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://blog.smooks.org/category/smooks/edi/</link>
	</image>
		<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[<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[<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>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[<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[<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>UN/EDIFACT Editor for Eclipse&#8230; Ecore/XMI Models etc</title>
		<link>http://blog.smooks.org/2010/09/18/unedifact-editor-for-eclipse/</link>
		<comments>http://blog.smooks.org/2010/09/18/unedifact-editor-for-eclipse/#comments</comments>
		<pubDate>Sat, 18 Sep 2010 12:05:01 +0000</pubDate>
		<dc:creator>Tom Fennelly</dc:creator>
				<category><![CDATA[EDI]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=518</guid>
		<description><![CDATA[<p>Renat Zubairov has been doing some really cool stuff with the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#UN.2FEDIFACT">Smooks UN/EDIFACT</a> support that&#8217;s been added for Smooks v1.4.  On top of the ECT tooling, he has built tools for generating <a href="http://www.eclipse.org/modeling/emf/">Eclipse EMF</a> Ecore (XMI) models for each of the EDI Mapping Models being produced by ECT.  On the back of this work, he has been able to build an Editor for Eclipse, allowing you to read and write UN/EDIFACT messages from inside Eclipse.</p>
<p><strong>See more <a href="http://www.smooks.org/mediawiki/index.php?title=EDI_Editor">here on the Smooks Wiki</a>.</strong></p>
<p>The UN/EDIFACT Editor for Eclipse is cool, but I think the wider impact of these capabilities is even cooler.  This is really important work because it will open a number of really important doors in terms of our ability to process and transform not just UN/EDIFACT, but EDI in general (X.12, HL7 etc).  Our long-term goal is to add support for X.12, HL7 etc to ECT (i.e. build conversion tools for these standards).  Once we do this, we will be able to provide out-of-the-box support for these EDI formats on the Smooks Runtime.  We hope it will also mean that we can use this work that Renat is doing to automate building of Ecore/XMI models for these same formats.  Once we have these Ecore/XMI models, we hope we will be able to:</p>
<ol>
<li>Build and provide XML Schemas (XSDs) for all of these messages.</li>
<li>Make use of <a href="http://wiki.eclipse.org/index.php/EMF_Compare">Eclipse EMF Compare</a> to compare models e.g. compare 2 different versions (D93 and D96) of a UN/EDIFACT Invoice specification.</li>
<li>Make use of <a href="http://www.eclipse.org/m2m/">Eclipse EMF M2M</a> to create a transformation model between 2 different models e.g. between UN/EDIFACT and X.12 Invoices.</li>
</ol>
<p>Note that this will not hit the main codebase until after we have released Smooks v1.4 i.e. we hope to make it available with Smooks v1.5.</p>
<p>This is awesome stuff.  Keep up the great work Renat!!!</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/smooks/edi/">EDI</a> by Tom Fennelly <a href="http://blog.smooks.org/2010/09/18/unedifact-editor-for-eclipse/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<p>Renat Zubairov has been doing some really cool stuff with the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#UN.2FEDIFACT">Smooks UN/EDIFACT</a> support that&#8217;s been added for Smooks v1.4.  On top of the ECT tooling, he has built tools for generating <a href="http://www.eclipse.org/modeling/emf/">Eclipse EMF</a> Ecore (XMI) models for each of the EDI Mapping Models being produced by ECT.  On the back of this work, he has been able to build an Editor for Eclipse, allowing you to read and write UN/EDIFACT messages from inside Eclipse.</p>
<p><strong>See more <a href="http://www.smooks.org/mediawiki/index.php?title=EDI_Editor">here on the Smooks Wiki</a>.</strong></p>
<p>The UN/EDIFACT Editor for Eclipse is cool, but I think the wider impact of these capabilities is even cooler.  This is really important work because it will open a number of really important doors in terms of our ability to process and transform not just UN/EDIFACT, but EDI in general (X.12, HL7 etc).  Our long-term goal is to add support for X.12, HL7 etc to ECT (i.e. build conversion tools for these standards).  Once we do this, we will be able to provide out-of-the-box support for these EDI formats on the Smooks Runtime.  We hope it will also mean that we can use this work that Renat is doing to automate building of Ecore/XMI models for these same formats.  Once we have these Ecore/XMI models, we hope we will be able to:</p>
<ol>
<li>Build and provide XML Schemas (XSDs) for all of these messages.</li>
<li>Make use of <a href="http://wiki.eclipse.org/index.php/EMF_Compare">Eclipse EMF Compare</a> to compare models e.g. compare 2 different versions (D93 and D96) of a UN/EDIFACT Invoice specification.</li>
<li>Make use of <a href="http://www.eclipse.org/m2m/">Eclipse EMF M2M</a> to create a transformation model between 2 different models e.g. between UN/EDIFACT and X.12 Invoices.</li>
</ol>
<p>Note that this will not hit the main codebase until after we have released Smooks v1.4 i.e. we hope to make it available with Smooks v1.5.</p>
<p>This is awesome stuff.  Keep up the great work Renat!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/09/18/unedifact-editor-for-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slides Smooks Community Day</title>
		<link>http://blog.smooks.org/2010/09/09/slides-smooks-community-day/</link>
		<comments>http://blog.smooks.org/2010/09/09/slides-smooks-community-day/#comments</comments>
		<pubDate>Thu, 09 Sep 2010 11:48:44 +0000</pubDate>
		<dc:creator>Maurice</dc:creator>
				<category><![CDATA[EDI]]></category>
		<category><![CDATA[Others Using Smooks]]></category>
		<category><![CDATA[Persistence]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Publications]]></category>
		<category><![CDATA[Scribe]]></category>
		<category><![CDATA[Smooks]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[Sopera]]></category>
		<category><![CDATA[un/edifact]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=497</guid>
		<description><![CDATA[<p>Here is a quick overview where you can find the slides presented on the Smooks Community Day 2010:</p>
<ul>
<li><a href="http://www.slideshare.net/tfennelly/unedifact-interchange-processing-with-smooks-v14-5104071" target="_blank">UN/EDIFACT processing with Smooks</a></li>
<li><a href="http://www.slideshare.net/mzeijen/reusing-existing-datalayertopersistmultif" target="_blank">Reusing existing data layer to persist multi format data streams</a></li>
<li><a href="http://www.slideshare.net/RenatZubairov/sopera-di-components-for-smooks-community-day" target="_blank">Smooks Sopera DI Components</a></li>
</ul>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/smooks/edi/">EDI</a> by Maurice <a href="http://blog.smooks.org/2010/09/09/slides-smooks-community-day/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<p>Here is a quick overview where you can find the slides presented on the Smooks Community Day 2010:</p>
<ul>
<li><a href="http://www.slideshare.net/tfennelly/unedifact-interchange-processing-with-smooks-v14-5104071" target="_blank">UN/EDIFACT processing with Smooks</a></li>
<li><a href="http://www.slideshare.net/mzeijen/reusing-existing-datalayertopersistmultif" target="_blank">Reusing existing data layer to persist multi format data streams</a></li>
<li><a href="http://www.slideshare.net/RenatZubairov/sopera-di-components-for-smooks-community-day" target="_blank">Smooks Sopera DI Components</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/09/09/slides-smooks-community-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processing UN/EDIFACT message Interchanges&#8230;</title>
		<link>http://blog.smooks.org/2010/06/28/processing-unedifact-message-interchanges/</link>
		<comments>http://blog.smooks.org/2010/06/28/processing-unedifact-message-interchanges/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 12:47:30 +0000</pubDate>
		<dc:creator>Tom Fennelly</dc:creator>
				<category><![CDATA[EDI]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=441</guid>
		<description><![CDATA[<p>Bård (Langöy) and I have been doing lots of work on improving our EDI support, specifically in the area of handling <a href="http://www.unece.org/trade/untdid/welcome.htm">UN/EDIFACT</a> (<a href="http://en.wikipedia.org/wiki/UN/EDIFACT">WikipediA</a>) message <a href="http://www.unece.org/trade/edifact/untdid/d300_s.htm#i">Interchanges</a>.  The following improvements are now in the Smooks v1.4 codebase (available from the 1.4-SNAPSHOT):</p>
<ol>
<li><strong>A new <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#UN.2FEDIFACT">UN/EDIFACT Interchange Reader</a></strong> (<em>&lt;unedifact:reader&gt;</em>), which allows Smooks to process UN/EFIFACT message Interchanges (one or more UN/EDIFACT messages wrapped in the UN/EDIFACT Interchange control segments).</li>
<li>A new <strong>Maven/Ant</strong> tool called the &#8220;<strong>EDI Conversion Tool</strong>&#8221; (<strong>ECT</strong>) that can take the <a href="http://www.unece.org/trade/untdid/down_index.htm">official UN/EDIFACT message definition directory zip files</a> and from them, generate a jar file containing a <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">set of equivalent Smooks EDI Mapping Models</a>.  This tool is very easy to configure and use, but we are in the processing of pre-generating a library of these jars for all the UN/EDIFACT message sets and making them available trough the central maven repository, making it even easier to consume UN/EDIFACT messages with Smooks.  We hope to add support for other formats (X.12, HL7 etc) in future releases of Smooks.</li>
</ol>
<p>So that&#8217;s what&#8217;s available in the current 1.4 codebase (1.4-SNAPSHOT), but we&#8217;re also in the process of making more additions to this for Smooks v1.4.  We&#8217;re extending the <strong>EDI Java Compiler</strong> (<strong>EJC</strong>) tools to support Java Model generation from the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI Mapping Model sets</a> generated by the ECT tool (mentioned above).  We&#8217;ll also make these available as pre-built jar files from the Maven repository.</p>
<p>Another improvement we&#8217;ve made in the 1.4 codebase is the addition of support for <strong>Java Model to EDI serialization</strong> on the EJC generated Java object models, meaning we&#8217;ll be able to do full round trip binding of an EDI (and UN/EDIFACT) message to a populated Java Object model that can be modified and then serialize back out to an EDI stream.  Or, your app can &#8220;manually&#8221; construct the same Java Object models and serialize them out to an EDI Stream (think JAXB).</p>
<h2>Generating a Mapping Model Set using ECT</h2>
<p>The easiest way to consume UN/EDIFACT messages using Smooks is to use ECT (EDI Conversion Tool) to generate the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI  Mapping Model set</a> (if we haven&#8217;t already pre-built them).  The steps are really easy:</p>
<ol>
<li>Download the official UN/EDIFACT message definitions directory zip file you are interested in <a href="http://www.unece.org/trade/untdid/down_index.htm">from the UNECE website</a>.</li>
<li>Create a maven module for the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI   Mapping Model set</a> to be generated and add the <em>maven-ect-plugin</em> (see below) to it&#8217;s POM.</li>
<li>Execute &#8220;<em>mvn clean install</em>&#8221; in your maven module and  the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI     Mapping Model set</a> jar file will be generated as normal in the  modules <em>target</em> folder, and installed into your local maven  repository.</li>
</ol>
<p>The following is an example of the maven module POM for generating the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI      Mapping Model set</a> jar for the <a href="http://www.unece.org/trade/untdid/down_index.htm">d03b.zip definitions directory zip file</a>.</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

    &lt;groupId&gt;org.milyn.edi.unedifact&lt;/groupId&gt;
    &lt;artifactId&gt;d03b-mapping&lt;/artifactId&gt;
    &lt;version&gt;1.0.SNAPSHOT&lt;/version&gt;
    &lt;name&gt;UN/EDIFACT - D03B - Mapping Model&lt;/name&gt;

    &lt;build&gt;
        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.milyn&lt;/groupId&gt;
                &lt;artifactId&gt;maven-ect-plugin&lt;/artifactId&gt;
		        &lt;version&gt;1.4-SNAPSHOT&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;src&gt;d03b.zip&lt;/src&gt;
                    &lt;srcType&gt;UNEDIFACT&lt;/srcType&gt;
                &lt;/configuration&gt;
                &lt;executions&gt;
                    &lt;execution&gt;
                        &lt;goals&gt;&lt;goal&gt;generate&lt;/goal&gt;
                    &lt;/goals&gt;&lt;/execution&gt;
                &lt;/executions&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;

&lt;/project&gt;</pre>
<p>Of course when we execute this step, we will perform &#8220;<em>mvn clean deploy</em>&#8221; and install the jar file in the <a href="http://smooks.org/mediawiki/index.php?title=Maven_%26_Ant">public maven repository</a>, making it publicly available and thereby removing the need for you to perform this step.  A peek into the <a href="http://snapshots.repository.codehaus.org/org/milyn/edi/unedifact/">public SNAPSHOT repo</a> shows that we&#8217;ve started this process.</p>
<h2>Using a Mapping Model Set on the UN/EDIFACT Reader</h2>
<p>Using a generated <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI       Mapping Model set</a> jar in your application (via Smooks) is trivial.  You need to:</p>
<ol>
<li>Add the generated <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI        Mapping Model set</a> jar to your classpath (e.g. using a maven dependency configuration).</li>
<li>Add the <em>&lt;unedifact:reader&gt;</em> configuration to your Smooks configuration, using the generated jar&#8217;s maven <em>groupId</em>, <em>artifactId</em> and <em>version</em> to reference that particular mapping model set through a <em>URN</em> (see below).</li>
</ol>
<p>An example of the <em>&lt;unedifact:reader&gt;</em> configuration for the above generated <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI         Mapping Model set</a> jar for the <a href="http://www.unece.org/trade/untdid/down_index.htm">d03b.zip  definitions directory zip file</a> would be as follows:</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">&lt;unedifact:reader
     mappingModel="urn:org.milyn.edi.unedifact:d03b-mapping:1.0-SNAPSHOT" /&gt;</pre>
<p>Using the &#8220;<em>urn:&lt;groupId&gt;:&lt;artifactId&gt;:&lt;version&gt;</em>&#8221; URN pattern, Smooks can find the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI          Mapping Model set</a> jar file on the classpath,</p>
<p>And that&#8217;s about it.  The associated Smooks instance will accept a UN/EDIFACT message interchange containing one or more messages defined in the <a href="http://www.unece.org/trade/untdid/down_index.htm">d03b.zip   definitions </a><a href="http://www.unece.org/trade/untdid/down_index.htm">directory </a><a href="http://www.unece.org/trade/untdid/down_index.htm">zip file</a>, and will generate a stream of SAX events into Smooks, which can be processed using all the other Smooks capabilities (Java Binding, Validation, Templating etc).  As stated earlier, the improvements we are working on for EJC will result in us being able to generate Java Object models from an <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI           Mapping Model set</a> jar.</p>
<h2>Play with the Examples&#8230; and please give feedback</h2>
<p>Check out and build the Smooks examples from https://svn.codehaus.org/milyn/trunk/smooks-examples (<em>mvn install</em>).</p>
<p>Change into the &#8220;ect-unedifact&#8221; directory after building all the examples (must build them all so as to install the poms) and run the example using <em>mvn exec:java. </em>The ect-unedifact example depends on the <em>&#8220;</em>d03b-mapping&#8221; module which has been pre-built and is available in the <a href="http://snapshots.repository.codehaus.org/org/milyn/edi/unedifact/">public SNAPSHOT repo</a>.</p>
<p>And guys&#8230;. PLEASE let us know how you get on with this stuff&#8230; things you like and dislike etc !!!</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/smooks/edi/">EDI</a> by Tom Fennelly <a href="http://blog.smooks.org/2010/06/28/processing-unedifact-message-interchanges/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<p>Bård (Langöy) and I have been doing lots of work on improving our EDI support, specifically in the area of handling <a href="http://www.unece.org/trade/untdid/welcome.htm">UN/EDIFACT</a> (<a href="http://en.wikipedia.org/wiki/UN/EDIFACT">WikipediA</a>) message <a href="http://www.unece.org/trade/edifact/untdid/d300_s.htm#i">Interchanges</a>.  The following improvements are now in the Smooks v1.4 codebase (available from the 1.4-SNAPSHOT):</p>
<ol>
<li><strong>A new <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#UN.2FEDIFACT">UN/EDIFACT Interchange Reader</a></strong> (<em>&lt;unedifact:reader&gt;</em>), which allows Smooks to process UN/EFIFACT message Interchanges (one or more UN/EDIFACT messages wrapped in the UN/EDIFACT Interchange control segments).</li>
<li>A new <strong>Maven/Ant</strong> tool called the &#8220;<strong>EDI Conversion Tool</strong>&#8221; (<strong>ECT</strong>) that can take the <a href="http://www.unece.org/trade/untdid/down_index.htm">official UN/EDIFACT message definition directory zip files</a> and from them, generate a jar file containing a <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">set of equivalent Smooks EDI Mapping Models</a>.  This tool is very easy to configure and use, but we are in the processing of pre-generating a library of these jars for all the UN/EDIFACT message sets and making them available trough the central maven repository, making it even easier to consume UN/EDIFACT messages with Smooks.  We hope to add support for other formats (X.12, HL7 etc) in future releases of Smooks.</li>
</ol>
<p>So that&#8217;s what&#8217;s available in the current 1.4 codebase (1.4-SNAPSHOT), but we&#8217;re also in the process of making more additions to this for Smooks v1.4.  We&#8217;re extending the <strong>EDI Java Compiler</strong> (<strong>EJC</strong>) tools to support Java Model generation from the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI Mapping Model sets</a> generated by the ECT tool (mentioned above).  We&#8217;ll also make these available as pre-built jar files from the Maven repository.</p>
<p>Another improvement we&#8217;ve made in the 1.4 codebase is the addition of support for <strong>Java Model to EDI serialization</strong> on the EJC generated Java object models, meaning we&#8217;ll be able to do full round trip binding of an EDI (and UN/EDIFACT) message to a populated Java Object model that can be modified and then serialize back out to an EDI stream.  Or, your app can &#8220;manually&#8221; construct the same Java Object models and serialize them out to an EDI Stream (think JAXB).</p>
<h2>Generating a Mapping Model Set using ECT</h2>
<p>The easiest way to consume UN/EDIFACT messages using Smooks is to use ECT (EDI Conversion Tool) to generate the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI  Mapping Model set</a> (if we haven&#8217;t already pre-built them).  The steps are really easy:</p>
<ol>
<li>Download the official UN/EDIFACT message definitions directory zip file you are interested in <a href="http://www.unece.org/trade/untdid/down_index.htm">from the UNECE website</a>.</li>
<li>Create a maven module for the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI   Mapping Model set</a> to be generated and add the <em>maven-ect-plugin</em> (see below) to it&#8217;s POM.</li>
<li>Execute &#8220;<em>mvn clean install</em>&#8221; in your maven module and  the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI     Mapping Model set</a> jar file will be generated as normal in the  modules <em>target</em> folder, and installed into your local maven  repository.</li>
</ol>
<p>The following is an example of the maven module POM for generating the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI      Mapping Model set</a> jar for the <a href="http://www.unece.org/trade/untdid/down_index.htm">d03b.zip definitions directory zip file</a>.</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

    &lt;groupId&gt;org.milyn.edi.unedifact&lt;/groupId&gt;
    &lt;artifactId&gt;d03b-mapping&lt;/artifactId&gt;
    &lt;version&gt;1.0.SNAPSHOT&lt;/version&gt;
    &lt;name&gt;UN/EDIFACT - D03B - Mapping Model&lt;/name&gt;

    &lt;build&gt;
        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.milyn&lt;/groupId&gt;
                &lt;artifactId&gt;maven-ect-plugin&lt;/artifactId&gt;
		        &lt;version&gt;1.4-SNAPSHOT&lt;/version&gt;
                &lt;configuration&gt;
                    &lt;src&gt;d03b.zip&lt;/src&gt;
                    &lt;srcType&gt;UNEDIFACT&lt;/srcType&gt;
                &lt;/configuration&gt;
                &lt;executions&gt;
                    &lt;execution&gt;
                        &lt;goals&gt;&lt;goal&gt;generate&lt;/goal&gt;
                    &lt;/goals&gt;&lt;/execution&gt;
                &lt;/executions&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;

&lt;/project&gt;</pre>
<p>Of course when we execute this step, we will perform &#8220;<em>mvn clean deploy</em>&#8221; and install the jar file in the <a href="http://smooks.org/mediawiki/index.php?title=Maven_%26_Ant">public maven repository</a>, making it publicly available and thereby removing the need for you to perform this step.  A peek into the <a href="http://snapshots.repository.codehaus.org/org/milyn/edi/unedifact/">public SNAPSHOT repo</a> shows that we&#8217;ve started this process.</p>
<h2>Using a Mapping Model Set on the UN/EDIFACT Reader</h2>
<p>Using a generated <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI       Mapping Model set</a> jar in your application (via Smooks) is trivial.  You need to:</p>
<ol>
<li>Add the generated <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI        Mapping Model set</a> jar to your classpath (e.g. using a maven dependency configuration).</li>
<li>Add the <em>&lt;unedifact:reader&gt;</em> configuration to your Smooks configuration, using the generated jar&#8217;s maven <em>groupId</em>, <em>artifactId</em> and <em>version</em> to reference that particular mapping model set through a <em>URN</em> (see below).</li>
</ol>
<p>An example of the <em>&lt;unedifact:reader&gt;</em> configuration for the above generated <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI         Mapping Model set</a> jar for the <a href="http://www.unece.org/trade/untdid/down_index.htm">d03b.zip  definitions directory zip file</a> would be as follows:</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">&lt;unedifact:reader
     mappingModel="urn:org.milyn.edi.unedifact:d03b-mapping:1.0-SNAPSHOT" /&gt;</pre>
<p>Using the &#8220;<em>urn:&lt;groupId&gt;:&lt;artifactId&gt;:&lt;version&gt;</em>&#8221; URN pattern, Smooks can find the <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI          Mapping Model set</a> jar file on the classpath,</p>
<p>And that&#8217;s about it.  The associated Smooks instance will accept a UN/EDIFACT message interchange containing one or more messages defined in the <a href="http://www.unece.org/trade/untdid/down_index.htm">d03b.zip   definitions </a><a href="http://www.unece.org/trade/untdid/down_index.htm">directory </a><a href="http://www.unece.org/trade/untdid/down_index.htm">zip file</a>, and will generate a stream of SAX events into Smooks, which can be processed using all the other Smooks capabilities (Java Binding, Validation, Templating etc).  As stated earlier, the improvements we are working on for EJC will result in us being able to generate Java Object models from an <a href="http://smooks.org/mediawiki/index.php?title=V1.4:Smooks_v1.4_User_Guide#Mapping_Model_Zip_Sets">EDI           Mapping Model set</a> jar.</p>
<h2>Play with the Examples&#8230; and please give feedback</h2>
<p>Check out and build the Smooks examples from https://svn.codehaus.org/milyn/trunk/smooks-examples (<em>mvn install</em>).</p>
<p>Change into the &#8220;ect-unedifact&#8221; directory after building all the examples (must build them all so as to install the poms) and run the example using <em>mvn exec:java. </em>The ect-unedifact example depends on the <em>&#8220;</em>d03b-mapping&#8221; module which has been pre-built and is available in the <a href="http://snapshots.repository.codehaus.org/org/milyn/edi/unedifact/">public SNAPSHOT repo</a>.</p>
<p>And guys&#8230;. PLEASE let us know how you get on with this stuff&#8230; things you like and dislike etc !!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/06/28/processing-unedifact-message-interchanges/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>

