You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ch...@apache.org on 2007/01/15 21:50:24 UTC

svn commit: r496484 [1/2] - in /incubator/servicemix/site: copy-of-hello-world-bc.html sandbox.html

Author: chirino
Date: Mon Jan 15 12:50:23 2007
New Revision: 496484

URL: http://svn.apache.org/viewvc?view=rev&rev=496484
Log:
Latest export from confluence

Added:
    incubator/servicemix/site/copy-of-hello-world-bc.html
Modified:
    incubator/servicemix/site/sandbox.html

Added: incubator/servicemix/site/copy-of-hello-world-bc.html
URL: http://svn.apache.org/viewvc/incubator/servicemix/site/copy-of-hello-world-bc.html?view=auto&rev=496484
==============================================================================
--- incubator/servicemix/site/copy-of-hello-world-bc.html (added)
+++ incubator/servicemix/site/copy-of-hello-world-bc.html Mon Jan 15 12:50:23 2007
@@ -0,0 +1,1126 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<HTML>
+  <HEAD>
+<!--
+    Pier's plugin always overwrites the stylesheet so lets explicitly use another one
+    <link type="text/css" rel="stylesheet" href="autoexport:///SM/resources/space.css">
+-->
+    <LINK type="text/css" rel="stylesheet" href="resources/site.css">
+    <SCRIPT src="resources/space.js" type="text/javascript"></SCRIPT>
+    <SCRIPT src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+    </SCRIPT>
+    <SCRIPT type="text/javascript">
+_uacct = "UA-398545-1";
+urchinTracker();
+    </SCRIPT>
+    <TITLE>
+Copy of Hello World - BC
+    </TITLE>
+  <META http-equiv="Content-Type" content="text/html;charset=UTF-8"></HEAD>
+  <BODY onload="init()">
+
+    <!-- Banner -->
+    <DIV id="site-banner">
+
+      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+        <TR>
+          <TD align="left" class="topbardiv" nowrap="">
+            <IMG border="0" src="http://incubator.apache.org/servicemix/images/logo.jpg">
+          </TD>
+          <TD align="right" nowrap="">
+            <IMG border="0" src="http://incubator.apache.org/images/apache-incubator-logo.png">
+          </TD>
+        </TR> 
+      </TABLE>
+
+    </DIV>
+
+    <!-- Bread crumbs and Quick Links -->
+    <DIV id="site-navbar">
+      <TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
+        <TR>
+          <TD align="left" valign="middle" nowrap="">
+            <DIV id="site-breadcrumbs">
+<A href="home.html" title="ServiceMix">ServiceMix</A>&nbsp;&gt;&nbsp;<A href="sandbox.html" title="Sandbox">Sandbox</A>&nbsp;&gt;&nbsp;<A href="" title="Copy of Hello World - BC">Copy of Hello World - BC</A>
+            </DIV>
+          </TD>
+          <TD align="right" valign="middle" nowrap="">
+            <DIV id="site-quicklinks">
+<P><A href="download.html" title="Download">Download</A> &#124; <A href="documentation.html" title="Documentation">Documentation</A> &#124; <A href="javadocs.html" title="JavaDocs">JavaDocs</A> &#124; <A href="source.html" title="Source">Source</A> &#124; <SPAN class="nobr"><A href="home.html" title="Visit page outside Confluence" rel="nofollow">Wiki<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> &#124; <A href="discussion-forums.html" title="Discussion Forums">Discussion Forums</A> &#124; <A href="support.html" title="Support">Support</A></P>
+            </DIV>
+          </TD>
+        </TR> 
+      </TABLE>
+    </DIV>
+
+<!-- Integrate google search later.
+          <form name="search" action="http://www.google.com/search" method="get">
+            <input type="hidden" name="ie" value="UTF- 8" />
+            <input type="hidden" name="oe" value="UTF- 8" />
+            <input type="hidden" name="domains" value="" />
+            <input type="hidden" name="sitesearch" value="" />
+            <input type="text" name="q" maxlength="255" value="" />        
+            <input type="submit" name="btnG" value="Google Search" />
+          </form>
+-->
+
+      <DIV id="site-content">
+        <TABLE>
+        <TR>
+        <TD valign="top">
+          <DIV id="site-navigation">
+<H3><A name="Navigation-Overview"></A>Overview</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="home.html" title="Home">Home</A></LI>
+	<LI><SPAN class="nobr"><A href="http://www.apache.org/" title="Visit page outside Confluence" rel="nofollow">ASF<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><A href="license.html" title="License">License</A></LI>
+	<LI><A href="faq.html" title="FAQ">FAQ</A></LI>
+	<LI><A href="download.html" title="Download">Download</A></LI>
+	<LI><A href="sitemap.html" title="SiteMap">SiteMap</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Community"></A>Community</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="users-guide.html" title="User's Guide">User&apos;s Guide</A></LI>
+	<LI><A href="documentation.html" title="Documentation">Documentation</A></LI>
+	<LI><A href="support.html" title="Support">Support</A></LI>
+	<LI><A href="discussion-forums.html" title="Discussion Forums">Discussion Forums</A></LI>
+	<LI><A href="mailing-lists.html" title="Mailing Lists">Mailing Lists</A></LI>
+	<LI><SPAN class="nobr"><A href="http://issues.apache.org/activemq/browse/SM" title="Visit page outside Confluence" rel="nofollow">Issues<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><A href="contributing.html" title="Contributing">Contributing</A></LI>
+	<LI><SPAN class="nobr"><A href="http://goopen.org/confluence/pages/listpages-dirview.action?key=SM" title="Visit page outside Confluence" rel="nofollow">Wiki<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI><A href="team.html" title="Team">Team</A></LI>
+	<LI><A href="users.html" title="Users">Users</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Developers"></A>Developers</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="source.html" title="Source">Source</A></LI>
+	<LI><A href="building.html" title="Building">Building</A></LI>
+	<LI><A href="ideas.html" title="Ideas">Ideas</A></LI>
+	<LI><A href="becoming-a-committer.html" title="Becoming a committer">Becoming a committer</A></LI>
+	<LI><A href="release-guide.html" title="Release Guide">Release Guide</A></LI>
+	<LI><A href="related-projects.html" title="Related Projects">Related Projects</A></LI>
+	<LI><A href="tools.html" title="Tools">Tools</A></LI>
+	<LI><A href="resources.html" title="Resources">Resources</A></LI>
+</UL>
+
+
+<H3><A name="Navigation-Components"></A>Components</H3>
+
+<UL class="alternate" type="square">
+	<LI><A href="servicemix-bean.html" title="servicemix-bean">servicemix&#45;bean</A></LI>
+	<LI><A href="servicemix-bpe.html" title="servicemix-bpe">servicemix&#45;bpe</A></LI>
+	<LI><A href="servicemix-drools.html" title="servicemix-drools">servicemix&#45;drools</A></LI>
+	<LI><A href="servicemix-eip.html" title="servicemix-eip">servicemix&#45;eip</A></LI>
+	<LI><A href="servicemix-file.html" title="servicemix-file">servicemix&#45;file</A></LI>
+	<LI><A href="servicemix-ftp.html" title="servicemix-ftp">servicemix&#45;ftp</A></LI>
+	<LI><A href="servicemix-http.html" title="servicemix-http">servicemix&#45;http</A></LI>
+	<LI><A href="servicemix-jms.html" title="servicemix-jms">servicemix&#45;jms</A></LI>
+	<LI><A href="servicemix-jsr181.html" title="servicemix-jsr181">servicemix&#45;jsr181</A></LI>
+	<LI><A href="servicemix-lwcontainer.html" title="servicemix-lwcontainer">servicemix&#45;lwcontainer</A></LI>
+	<LI><A href="servicemix-saxon.html" title="servicemix-saxon">servicemix&#45;saxon</A></LI>
+	<LI><A href="servicemix-script.html" title="servicemix-script">servicemix&#45;script</A></LI>
+	<LI><A href="servicemix-wsn2005.html" title="servicemix-wsn2005">servicemix&#45;wsn2005</A></LI>
+	<LI><A href="servicemix-xmpp.html" title="servicemix-xmpp">servicemix&#45;xmpp</A></LI>
+</UL>
+
+
+          </DIV>
+        </TD>
+        <TD valign="top">
+          <DIV id="site-page">
+
+<!--          
+            <div class="pagetitle">Copy of Hello World -  BC</div>
+-->
+            <DIV class="wiki-content"><H1><A name="CopyofHelloWorld-BC-CreatingaHelloWorldJBIBindingComponent"></A>Creating a Hello World JBI Binding Component</H1>
+
+<P>This tutorial describes how to create a very simple Hello World style of JBI binding component. This tutorial is as minimalistic as possible so as to focus on key concepts and not drown in details. The Hello World binding component will respond to all requests with the message: </P>
+
+<DIV class="panel"><DIV class="panelContent">
+<P>&lt;hello&gt;Hello World! Message [&lt;original message here&gt;] contains [??] bytes.&lt;/hello&gt;</P>
+</DIV></DIV>
+
+<P>The following sections will walk through the creation, packaging, testing and deployment of the Hello World binding component. </P>
+
+<H2><A name="CopyofHelloWorld-BC-Prerequisites"></A>Prerequisites</H2>
+
+<UL>
+	<LI>Maven 2.0.4 or higher
+	<UL>
+		<LI>If you have never used Maven previously the Maven <SPAN class="nobr"><A href="http://maven.apache.org/guides/getting-started/index.html" title="Visit page outside Confluence" rel="nofollow">Getting Started Guide<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> explains some valuable concepts surrounding Maven</LI>
+	</UL>
+	</LI>
+	<LI>ServiceMix 3.1-incubating-SNAPSHOT or higher
+	<UL>
+		<LI>See the <SPAN class="nobr"><A href="http://servicemix.org/site/download.html" title="Visit page outside Confluence" rel="nofollow">ServiceMix downloads<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> to grab a nightly build as ServiceMix 3.1 has not yet been released</LI>
+	</UL>
+	</LI>
+	<LI>A broadband internet connection so Maven can automatically download dependencies</LI>
+</UL>
+
+
+<H2><A name="CopyofHelloWorld-BC-AVeryBriefIntroductiontoJavaBusinessIntegration"></A>A Very Brief Introduction to Java Business Integration </H2>
+
+<P>The <SPAN class="nobr"><A href="http://jcp.org/en/jsr/detail?id=208" title="Visit page outside Confluence" rel="nofollow">Java Business Integration (JBI) spec<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> provides a standards-based, service-oriented approach to application integration through the use of an abstract messaging model, without reference to a particular protocol or wire encoding. JBI introduces the concepts of Binding Components (BCs), Service Engines (SEs) to  Service Units (SUs) and Service Assemblies (SAs) to define an architecture for vendor-neutral pluggable components. The purpose of this architecture is to provide standards-based interoperability amongst components/services. </P>
+
+<P>JBI components are can be thought of as the <EM>smallest applications</EM> or <EM>services</EM> accessible in a service-oriented architecture. Each service has a very specific purpose and therefore a narrow scope and set of functionality. Components come in two flavors: Service Engines (SE) and Binding Components (BC). SUs must be packaged into a SA to be deployed to the JBI container. An SA is a <EM>complete application</EM> consisting of one or more services. By comparison, this is similar to the way that WAR files must be packaged inside of an EAR file to be deployed to a J2EE container. </P>
+
+<P>See also the page providing information on <SPAN class="nobr"><A href="http://incubator.apache.org/servicemix/main/working-with-service-units.html" title="Visit page outside Confluence" rel="nofollow">working with service units<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P>
+
+<P>Below are some quick definitions the are dominant throughout the JBI spec: </P>
+
+<UL>
+	<LI><B>Component Architecture</B>
+	<UL>
+		<LI><B>Binding Components</B> - Components that provide or consume services via some sort of communications protocol or other remoting technology</LI>
+		<LI><B>Service Engines</B> - Components that supply or consume services locally (within the JBI container)</LI>
+	</UL>
+	</LI>
+</UL>
+
+
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="noteMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>
+<P>The difference between binding components (BCs) and service engines (SEs) is definitely subtle and is not denoted by the JBI APIs. In fact, the only real true difference between the two is in the <TT>jbi.xml</TT> descriptor in the packaging. What it really boils down to is the fact that BCs are used to do integration with a service outside the bus and SEs are services that are deployed to and solely contained within the bus. Hopefully the JBI 2.0 spec will provide more distinction. </P></TD></TR></TABLE>
+
+<UL>
+	<LI><B>Component Packaging</B>
+	<UL>
+		<LI><B>Service Units</B> - Packaging for an individual service that allows deployment to the JBI container; similar to a WAR file from J2EE</LI>
+		<LI><B>Service Assemblies</B> - Packaging for groups of SUs for deployment to the JBI container; similar to an EAR file from J2EE</LI>
+	</UL>
+	</LI>
+</UL>
+
+
+<P>This tutorial focuses on both component architecture and component packaging. For further information and details on JBI, see the following: </P>
+
+<UL>
+	<LI>The <SPAN class="nobr"><A href="http://jcp.org/en/jsr/detail?id=208" title="Visit page outside Confluence" rel="nofollow">JBI spec<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
+	<LI>The <A href="5-jbi.html" title="5. JBI">JBI</A> section of the <A href="users-guide.html" title="User's Guide">User&apos;s Guide</A></LI>
+	<LI>The <SPAN class="nobr"><A href="https://open-esb.dev.java.net/public/whitepapers/JBIforSOI.pdf" title="Visit page outside Confluence" rel="nofollow">JBIforSOI<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> article</LI>
+	<LI>The <SPAN class="nobr"><A href="http://www.javaworld.com/javaworld/jw-12-2005/jw-1212-esb.html" title="Visit page outside Confluence" rel="nofollow">ServiceMix as an enterprise service bus<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> JavaWorld article</LI>
+</UL>
+
+
+<P>Now let&apos;s move on to creating the Maven projects for the Hello World binding component. </P>
+
+<H2><A name="CopyofHelloWorld-BC-CreatingaMavenProjectFortheJBIBC"></A>Creating a Maven Project For the JBI BC </H2>
+
+<P>The focus of this section is on the creation of a JBI binding component. For this task, a <SPAN class="nobr"><A href="http://maven.apache.org/guides/introduction/introduction-to-archetypes.html" title="Visit page outside Confluence" rel="nofollow">Maven archetype<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> will be used to create a Maven project skeleton to house the component. Maven archetypes are templates for Maven projects that jumpstart project creation via the automation of repetitive tasks by following standard conventions. The result of using an archetype to create a Maven project is a directory structure, a <SPAN class="nobr"><A href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html" title="Visit page outside Confluence" rel="nofollow">Maven POM<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/lin
 kext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> file and, depending on the archetype being used, sometimes Java objects and JUnit tests. </P>
+
+<P>Below are the steps to follow for creating the directory structure and project. All instructions laid out to take place on a Unix command-line. </P>
+
+<P>1) Create a directory named <TT>hello-world-smx</TT> and switch to that directory: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">$ mkdir hello-world-smx
+$ cd hello-world-smx</PRE>
+</DIV></DIV>
+
+<P>2) Use the <SPAN class="nobr"><A href="http://svn.apache.org/viewvc/incubator/servicemix/trunk/archetypes/servicemix-binding-component/" title="Visit page outside Confluence" rel="nofollow">servicemix-service-engine<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> Maven archetype to generate a Maven project for the component. </P>
+
+<P>To create a SE, execute the following command on the command-line: </P>
+
+<DIV class="panel"><DIV class="panelContent">
+<P>$ mvn archetype:create \<BR>
+    -DarchetypeGroupId=org.apache.servicemix.tooling \<BR>
+    -DarchetypeArtifactId=servicemix-binding-component \<BR>
+    -DarchetypeVersion=3.1-incubating-SNAPSHOT \<BR>
+    -DgroupId=org.apache.servicemix.samples.helloworld.bc \<BR>
+    -DartifactId=hello-world-bc-su</P>
+</DIV></DIV>
+
+<P>The command above will create a directory named <TT>hello-world-bc-su</TT> that houses a Maven project for the JBI service engine being created here. The name of the directory is taken from the <TT>artifactId</TT> parameter. </P>
+
+<P>The first three parameters to the <TT>mvn</TT> command (-DarchetypeGroupId=org.apache.servicemix.tooling -DarchetypeArtifactId=servicemix-binding-component -DarchetypeVersion=3.1-incubating-SNAPSHOT) identify which Maven archetype to use for the <TT>archetype:create</TT> goal, while the last two parameters (-DgroupId=org.apache.servicemix.samples.helloworld.bc -DartifactId=hello-world-bc-su) uniquely identify the Maven project that is being generated. The <TT>groupId</TT> is used as the Java package and the <TT>artifactId</TT> is used as the project name. Therefore, only alphanumeric characters are valid values for the <TT>groupId</TT> and <TT>artifactId</TT> parameters. </P>
+
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="tipMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD>
+<P>The value of the <TT>archetypeVersion</TT> parameter in the command above (3.1-incubating-SNAPSHOT) may need to be updated to the current ServiceMix version in order for the command to work correctly. The latest version can always be found <SPAN class="nobr"><A href="http://fisheye3.cenqua.com/browse/servicemix/trunk/pom.xml?r=trunk" title="Visit page outside Confluence" rel="nofollow">in the top level ServiceMix POM<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> in the <TT>&lt;version&gt;</TT> element. </P></TD></TR></TABLE>
+
+<P>The output from executing the <TT>archetype:create</TT> goal is shown below:</P>
+
+<DIV class="preformatted"><DIV class="preformattedContent">
+<PRE>[INFO] Scanning for projects...
+[INFO] Reactor build order: 
+[INFO]   A custom project
+[INFO]   A custom project
+[INFO]   Hello World JBI Component
+[INFO] Searching repository for plugin with prefix: &apos;archetype&apos;.
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building Hello World JBI Component
+[INFO]    task-segment: [archetype:create] (aggregator-style)
+[INFO] ----------------------------------------------------------------------------
+[INFO] Setting property: classpath.resource.loader.class =&gt; &apos;org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader&apos;.
+[INFO] Setting property: velocimacro.messages.on =&gt; &apos;false&apos;.
+[INFO] Setting property: resource.loader =&gt; &apos;classpath&apos;.
+[INFO] Setting property: resource.manager.logwhenfound =&gt; &apos;false&apos;.
+[INFO] ************************************************************** 
+[INFO] Starting Jakarta Velocity v1.4
+[INFO] RuntimeInstance initializing.
+[INFO] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
+[INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
+[INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
+[INFO] ClasspathResourceLoader : initialization starting.
+[INFO] ClasspathResourceLoader : initialization complete.
+[INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
+[INFO] Default ResourceManager initialization complete.
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
+[INFO] Created: 20 parsers.
+[INFO] Velocimacro : initialization starting.
+[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
+[ERROR] ResourceManager : unable to find resource &apos;VM_global_library.vm&apos; in any resource loader.
+[INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: 
+Unable to find resource &apos;VM_global_library.vm&apos;
+[INFO] Velocimacro :  VM library template macro registration complete.
+[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
+[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
+[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be  global in scope if allowed.
+[INFO] Velocimacro : initialization complete.
+[INFO] Velocity successfully started.
+[INFO] [archetype:create]
+[INFO] Defaulting package to group ID: org.apache.servicemix.samples.helloworld.bc
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating Archetype: servicemix-binding-component:3.1-incubating-SNAPSHOT
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: org.apache.servicemix.samples.helloworld.bc
+[INFO] Parameter: packageName, Value: org.apache.servicemix.samples.helloworld.bc
+[INFO] Parameter: basedir, Value: /Users/bsnyder/src/hello-world-smx
+[INFO] Parameter: package, Value: org.apache.servicemix.samples.helloworld.bc
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: artifactId, Value: hello-world-bc-su
+[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 68,column 16] : 
+${servicemix-version} is not a valid reference.
+[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 73,column 16] : 
+${servicemix-version} is not a valid reference.
+[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 97,column 18] : 
+${xbean-version} is not a valid reference.
+[INFO] ********************* End of debug info from resources from generated POM ***********************
+[INFO] Archetype created in dir: /Users/bsnyder/src/hello-world-smx/hello-world-bc-su
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 2 seconds
+[INFO] Finished at: Mon Jan 15 13:35:44 MST 2007
+[INFO] Final Memory: 5M/10M
+[INFO] ------------------------------------------------------------------------
+</PRE>
+</DIV></DIV>
+
+<P>Again, Maven creates a directory using the <TT>artifactId</TT> provided as the directory name. Inside this directory resides the <TT>pom.xml</TT> and the <TT>src</TT> directory. If you see the BUILD SUCCESSFUL message, proceed to the next section. Otherwise see the note below about a BUILD ERROR. </P>
+
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="noteMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">In case of a BUILD ERROR: Maven plugin version requirement</B><BR>
+<P>The maven-archetype-plugin <B>1.0-alpha4</B> or above is required for this tutorial. When an older version is installed, a build error will occur. The version of this plugin can be checked by verifying the name of the following directories: </P>
+
+<DIV class="code"><DIV class="codeHeader"><B>Unix</B></DIV><DIV class="codeContent">
+<PRE class="code-java">~/.m2/repository/org/apache/maven/plugins/maven-archetype-plugin</PRE>
+</DIV></DIV>
+
+<DIV class="code"><DIV class="codeHeader"><B>Windows</B></DIV><DIV class="codeContent">
+<PRE class="code-java">C:\Documents and Settings\&lt;USERNAME&gt;\.m2\repository\org\apache\maven\plugins\maven-archetype-plugin</PRE>
+</DIV></DIV> 
+
+<P>In case the only version available of the maven-archetype-plugin is an older one, a minimal <TT>pom.xml</TT> file will need to be created manually in the <TT>hello-world-se-su</TT> directory. Below is a simple POM to use for this purpose: </P>
+
+<DIV class="code"><DIV class="codeHeader"><B>Minimal pom.xml</B></DIV><DIV class="codeContent">
+<PRE class="code-java">&lt;?xml version=<SPAN class="code-quote">&quot;1.0&quot;</SPAN> encoding=<SPAN class="code-quote">&quot;UTF-8&quot;</SPAN>?&gt;
+&lt;project xmlns=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//maven.apache.org/POM/4.0.0&quot;</SPAN> 
+</SPAN>    xmlns:xsi=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//www.w3.org/2001/XMLSchema-instance&quot;</SPAN>
+</SPAN>    xsi:schemaLocation=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</SPAN>&gt;
+</SPAN>    
+  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
+  &lt;groupId&gt;org.apache.servicemix.samples.helloworld&lt;/groupId&gt;
+  &lt;artifactId&gt;hello-world-se-su&lt;/artifactId&gt;
+  &lt;packaging&gt;pom&lt;/packaging&gt;
+  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
+
+  &lt;build&gt;
+    &lt;pluginManagement&gt;
+      &lt;plugins&gt;
+        &lt;plugin&gt;
+          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+          &lt;artifactId&gt;maven-archetype-plugin&lt;/artifactId&gt;
+          &lt;version&gt;1.0-alpha-4&lt;/version&gt;
+        &lt;/plugin&gt;
+      &lt;/plugins&gt;
+    &lt;/pluginManagement&gt;
+  &lt;/build&gt;
+&lt;/project&gt;</PRE>
+</DIV></DIV></TD></TR></TABLE>
+
+<H2><A name="CopyofHelloWorld-BC-CompilingtheProject"></A>Compiling the Project </H2>
+
+<P>Since we just created this project, we should first compile it just to make sure nothing is wrong with what the archetype generated. To compile, package and test the project, execute the following command from the command-line: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">$ cd ./hello-world-bc-su
+$ mvn install</PRE>
+</DIV></DIV>
+
+<P>This command should produce the following output: </P>
+
+<DIV class="preformatted"><DIV class="preformattedContent">
+<PRE>[INFO] Scanning for projects...
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building A custom project
+[INFO]    task-segment: [install]
+[INFO] ----------------------------------------------------------------------------
+[INFO] [xbean:mapping {execution: default}]
+Checking: org.apache.servicemix.samples.helloworld.se.MyComponent
+Checking: org.apache.servicemix.samples.helloworld.se.MyEndpoint
+[INFO] Generating META-INF properties file: 
+/Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/services/org/apache/xbean/spring/http/org.apache.servicemix.samples.helloworld.se/1.0 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating Spring 2.0 handler mapping: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/spring.handlers 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating Spring 2.0 schema mapping: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/spring.schemas 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating HTML documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.html 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating XSD file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating WIKI documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.wiki 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+Warning, could not load class: org.apache.servicemix.samples.helloworld.se.MyEndpoint
+[INFO] ...done.
+Downloading: http://repo.mergere.com/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
+[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
+Downloading: http://repo.mergere.com/maven2/wss4j/wss4j/1.5.0/wss4j-1.5.0.pom
+[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
+[INFO] [jbi:generate-jbi-component-descriptor]
+[INFO] Generating jbi.xml
+[INFO] [resources:resources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:compile]
+Compiling 3 source files to /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/classes
+[INFO] [resources:testResources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:testCompile]
+Compiling 1 source file to /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/test-classes
+[INFO] [surefire:test]
+[INFO] Surefire report directory: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/surefire-reports
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.apache.servicemix.samples.helloworld.se.MySpringComponentTest
+&lt;hello&gt;world&lt;/hello&gt;
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.843 sec
+
+Results :
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+[INFO] [jar:jar]
+[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT.jar
+[INFO] [jbi:jbi-component]
+[INFO] Generating installer /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] [install:install]
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT.jar to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT.jar
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT.xsd
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.html to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT-schema.html
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 41 seconds
+[INFO] Finished at: Mon Jan 15 13:06:03 MST 2007
+[INFO] Final Memory: 12M/26M
+[INFO] ------------------------------------------------------------------------
+</PRE>
+</DIV></DIV>
+
+<P>Again, the key here is to make sure you see BUILD SUCCESSFUL. This means that the project skeleton created by the archetype was compiled, packaged and tested successfully. Now we just need to add some custom functionality. </P>
+
+<H2><A name="CopyofHelloWorld-BC-CreatingtheJBIComponent"></A>Creating the JBI Component </H2>
+
+<P>Before we create any custom functionality, let&apos;s first examine some of the items generated by the servicemix-service-engine Maven archetype in this simple component we&apos;re developing. These classes extend class from either the <SPAN class="nobr"><A href="http://java.sun.com/integration/1.0/docs/sdk/api/index.html" title="Visit page outside Confluence" rel="nofollow">JBI spec APIs<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> or from the <SPAN class="nobr"><A href="http://fisheye3.cenqua.com/browse/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common" title="Visit page outside Confluence" rel="nofollow"><TT>servicemix-common</TT><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> package. </P>
+
+<UL>
+	<LI><TT>pom.xml</TT> - This is the <SPAN class="nobr"><A href="http://maven.apache.org/guides/introduction/introduction-to-the-pom.html" title="Visit page outside Confluence" rel="nofollow">Maven POM<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>] file. This XML file contains all the metadata related to the project so Maven can carry out its functionality.</LI>
+</UL>
+
+
+<UL>
+	<LI><TT>MyBootstrap.java</TT> - Implements <SPAN class="nobr"><A href="http://java.sun.com/integration/1.0/docs/sdk/api/javax/jbi/component/Bootstrap.html" title="Visit page outside Confluence" rel="nofollow"><TT>javax.jbi.component.Boostrap</TT><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> which is called by the JBI container as part of the component lifecycle (i.e.g, when the component is installed and uninstalled). This is where you place logic to set up and tear down things when the component is started and stopped.</LI>
+</UL>
+
+
+<UL>
+	<LI><TT>MyComponent.java</TT> - Extends the <SPAN class="nobr"><A href="http://fisheye3.cenqua.com/browse/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java?r=trunk" title="Visit page outside Confluence" rel="nofollow"><TT>DefaultComponent</TT><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>, a convenience class that makes creating JBI components much easier and provides some additional lifecycle management of components deployed to the JBI container. This class should be fleshed out by overriding methods in the <TT>DefaultComponent</TT> to configure and initialize the component.</LI>
+</UL>
+
+
+<UL>
+	<LI><TT>MyEndpoint.java</TT> - Extends <SPAN class="nobr"><A href="http://fisheye3.cenqua.com/browse/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/Endpoint.java?r=trunk" title="Visit page outside Confluence" rel="nofollow"><TT>Endpoint</TT><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> and implements <SPAN class="nobr"><A href="http://fisheye3.cenqua.com/browse/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/ExchangeProcessor.java?r=trunk" title="Visit page outside Confluence" rel="nofollow"><TT>ExchangeProcessor</TT><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>. <TT>Endpoint</TT> provides a referencable resource for the component and the <TT>ExchangeProcessor</TT> p
 rovides the ability for the JBI container to process a message exchange with the component. The <TT>ExchangeProcessor.process()</TT> method is where we will add custom functionality to print out the Hello World message.</LI>
+</UL>
+
+
+<UL>
+	<LI><TT>MySpringComponentTest.java</TT> - A simple JUnit test class that extends a helper class to make configuring ServiceMix very easy.</LI>
+</UL>
+
+
+<UL>
+	<LI><TT>src/test/resources/spring.xml</TT> - The very simple and generic ServiceMix configuration file.</LI>
+</UL>
+
+
+<P>Now that we&apos;ve gotten a bird&apos;s eye view of what we&apos;re working with, let&apos;s proceed to adding the custom functionality. </P>
+
+<H3><A name="CopyofHelloWorld-BC-AddingCustomFunctionality"></A>Adding Custom Functionality </H3>
+
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="noteMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Using an IDE</B><BR>
+<P>It is at this stage that you should employ the use of an IDE. An IDE can dramatically reduce the work necessary to import clases, override methods and so much more. Because Maven can generate project files for Eclipse and IntelliJ IDEA, either one can be used. Throughout this tutorial, Eclipse will be used. To generate project files for Eclipse, execute the Maven <TT>eclipse:eclipse</TT> goal and then import the project into your Eclipse IDE. </P></TD></TR></TABLE>
+
+<P>When creating a JBI component, how a message exchange is handled depends on whether a component is a consumer or a provider. Because the Hello World SE will not be consuming any other service (i.e., sending a message to another service), it is a provider (i.e., it will only be providing its service via a return message). As mentioned above, the <TT>ExchangeProcessor.process()</TT> method is of interest because it is where the message exchange is handled, so let&apos;s examine this method: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java"><SPAN class="code-keyword">public</SPAN> void process(MessageExchange exchange) <SPAN class="code-keyword">throws</SPAN> Exception {
+        <SPAN class="code-comment">// The component acts as a provider, <SPAN class="code-keyword">this</SPAN> means that another component has requested our service
+</SPAN>        <SPAN class="code-comment">// As <SPAN class="code-keyword">this</SPAN> exchange is active, <SPAN class="code-keyword">this</SPAN> is either an in or a fault (out are send by <SPAN class="code-keyword">this</SPAN> component)
+</SPAN>        <SPAN class="code-keyword">if</SPAN> (exchange.getRole() == MessageExchange.Role.PROVIDER) {
+            <SPAN class="code-comment">// Check here <SPAN class="code-keyword">if</SPAN> the mep is supported by <SPAN class="code-keyword">this</SPAN> component
+</SPAN>            <SPAN class="code-keyword">if</SPAN> (exchange <SPAN class="code-keyword">instanceof</SPAN> InOut == <SPAN class="code-keyword">false</SPAN>) {
+               <SPAN class="code-keyword">throw</SPAN> <SPAN class="code-keyword">new</SPAN> UnsupportedOperationException(<SPAN class="code-quote">&quot;Unsupported MEP: &quot;</SPAN> + exchange.getPattern());
+            }
+            <SPAN class="code-comment">// In message
+</SPAN>            <SPAN class="code-keyword">if</SPAN> (exchange.getMessage(<SPAN class="code-quote">&quot;in&quot;</SPAN>) != <SPAN class="code-keyword">null</SPAN>) {
+                NormalizedMessage in = exchange.getMessage(<SPAN class="code-quote">&quot;in&quot;</SPAN>);
+                <SPAN class="code-comment">// TODO ... handle the in message
+</SPAN>                <SPAN class="code-comment">// If the MEP is an InOnly, RobustInOnly, you have to set the exchange to DONE status
+</SPAN>                <SPAN class="code-comment">// <SPAN class="code-keyword">else</SPAN>, you have to create an Out message and populate it
+</SPAN>                <SPAN class="code-comment">// For now, just echo back
+</SPAN>                NormalizedMessage out = exchange.createMessage();
+                out.setContent(in.getContent());
+                exchange.setMessage(out, <SPAN class="code-quote">&quot;out&quot;</SPAN>);
+                channel.send(exchange);
+            <SPAN class="code-comment">// Fault message
+</SPAN>            } <SPAN class="code-keyword">else</SPAN> <SPAN class="code-keyword">if</SPAN> (exchange.getFault() != <SPAN class="code-keyword">null</SPAN>) {
+                <SPAN class="code-comment">// TODO ... handle the fault
+</SPAN>                exchange.setStatus(ExchangeStatus.DONE);
+                channel.send(exchange);
+            <SPAN class="code-comment">// This is not compliant with the <SPAN class="code-keyword">default</SPAN> MEPs
+</SPAN>            } <SPAN class="code-keyword">else</SPAN> {
+                <SPAN class="code-keyword">throw</SPAN> <SPAN class="code-keyword">new</SPAN> IllegalStateException(<SPAN class="code-quote">&quot;Provider exchange is ACTIVE, but no in or fault is provided&quot;</SPAN>);
+            }
+        <SPAN class="code-comment">// The component acts as a consumer, <SPAN class="code-keyword">this</SPAN> means <SPAN class="code-keyword">this</SPAN> exchange is received because
+</SPAN>        <SPAN class="code-comment">// we sent it to another component.  As it is active, <SPAN class="code-keyword">this</SPAN> is either an out or a fault
+</SPAN>        <SPAN class="code-comment">// If <SPAN class="code-keyword">this</SPAN> component does not create / send exchanges, you may just <SPAN class="code-keyword">throw</SPAN> an UnsupportedOperationException
+</SPAN>        } <SPAN class="code-keyword">else</SPAN> <SPAN class="code-keyword">if</SPAN> (exchange.getRole() == MessageExchange.Role.CONSUMER) {
+            <SPAN class="code-comment">// Exchange is finished
+</SPAN>            <SPAN class="code-keyword">if</SPAN> (exchange.getStatus() == ExchangeStatus.DONE) {
+                <SPAN class="code-keyword">return</SPAN>;
+            <SPAN class="code-comment">// Exchange has been aborted with an exception
+</SPAN>            } <SPAN class="code-keyword">else</SPAN> <SPAN class="code-keyword">if</SPAN> (exchange.getStatus() == ExchangeStatus.ERROR) {
+                <SPAN class="code-keyword">return</SPAN>;
+            <SPAN class="code-comment">// Exchange is active
+</SPAN>            } <SPAN class="code-keyword">else</SPAN> {
+                <SPAN class="code-comment">// Out message
+</SPAN>                <SPAN class="code-keyword">if</SPAN> (exchange.getMessage(<SPAN class="code-quote">&quot;out&quot;</SPAN>) != <SPAN class="code-keyword">null</SPAN>) {
+                    <SPAN class="code-comment">// TODO ... handle the response
+</SPAN>                    exchange.setStatus(ExchangeStatus.DONE);
+                    channel.send(exchange);
+                <SPAN class="code-comment">// Fault message
+</SPAN>                } <SPAN class="code-keyword">else</SPAN> <SPAN class="code-keyword">if</SPAN> (exchange.getFault() != <SPAN class="code-keyword">null</SPAN>) {
+                    <SPAN class="code-comment">// TODO ... handle the fault
+</SPAN>                    exchange.setStatus(ExchangeStatus.DONE);
+                    channel.send(exchange);
+                <SPAN class="code-comment">// This is not compliant with the <SPAN class="code-keyword">default</SPAN> MEPs
+</SPAN>                } <SPAN class="code-keyword">else</SPAN> {
+                    <SPAN class="code-keyword">throw</SPAN> <SPAN class="code-keyword">new</SPAN> IllegalStateException(<SPAN class="code-quote">&quot;Consumer exchange is ACTIVE, but no out or fault is provided&quot;</SPAN>);
+                }
+            }
+        <SPAN class="code-comment">// Unknown role
+</SPAN>        } <SPAN class="code-keyword">else</SPAN> {
+            <SPAN class="code-keyword">throw</SPAN> <SPAN class="code-keyword">new</SPAN> IllegalStateException(<SPAN class="code-quote">&quot;Unkown role: &quot;</SPAN> + exchange.getRole());
+        }
+    }</PRE>
+</DIV></DIV>
+
+<P>The implementation of the method above was provided by the servicemix-service-engine Maven archetype. This method is very generic and contains a conditional block for handling either a consumer or a provider role. But this method will still require us to make the decision of which style of <SPAN class="nobr"><A href="http://servicemix.org/site/5-jbi.html#5.JBI-ServiceinvocationandMEP" title="Visit page outside Confluence" rel="nofollow">Message Exchange Pattern (MEP)<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> to handle. In the case of the Hello World SE, we know that it is a provider so it will need to send a return message. Therefore it will need to handle an <SPAN class="nobr"><A href="http://www.w3.org/TR/2004/WD-wsdl20-extensions-20040803/#in-out" title="Visit page outside Confluence" rel="nofollow">In-Out MEP<SUP><IMG class="rendericon" src="http:/
 /goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>. So instead of having <TT>MyEndpoint</TT> extend the very basic <TT>Endpoint</TT> class and implement its own <TT>process()</TT> method, we&apos;re going to extend a different class that is specifically for provider endpoints named <BR>
+<SPAN class="nobr"><A href="http://fisheye3.cenqua.com/browse/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java?r=trunk" title="Visit page outside Confluence" rel="nofollow"><TT>ProviderEndpoint</TT><SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>. </P>
+
+<P><SPAN class="error">Unable to render embedded object: File (simple_endpoint_hierarchy.png) not found.</SPAN></P>
+
+<P>Notice the diagram above showing the class hierarchy of <TT>Endpoint</TT>. The <TT>ProviderEndpoint</TT> supplies some additional conveniences for provider components beyond what the <TT>Endpoint</TT> class provides and will make the job of implementing <TT>MyEndpoint</TT> as a provider much easier. So let&apos;s make some changes to the <TT>MyEndpoint</TT> class. <B>First</B> remove the <TT>process()</TT> method shown above. <B>Second</B>, change the definition of the <TT>MyEndpoint</TT> class from this: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java"><SPAN class="code-keyword">public</SPAN> class MyEndpoint <SPAN class="code-keyword">extends</SPAN> Endpoint <SPAN class="code-keyword">implements</SPAN> ExchangeProcessor</PRE>
+</DIV></DIV>
+
+<P>to this: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java"><SPAN class="code-keyword">public</SPAN> class MyEndpoint <SPAN class="code-keyword">extends</SPAN> ProviderEndpoint <SPAN class="code-keyword">implements</SPAN> ExchangeProcessor</PRE>
+</DIV></DIV> 
+
+<P>By the way, making this change will require the import of the full class (<TT>org.apache.servicemix.common.endpoints.ProviderEndpoint</TT>). This class can be found in the <SPAN class="nobr"><A href="http://fisheye3.cenqua.com/browse/servicemix/trunk/servicemix-common/" title="Visit page outside Confluence" rel="nofollow">servicemix-common<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> project. </P>
+
+<P><B>Third</B>, because the <TT>ProviderEndpoint.process()</TT> method already handles an In-Out MEP (and other MEPs), <TT>MyEndpoint</TT> will simply need to override the <TT>ProviderEndpoint.processInOut()</TT> method. Below is the content for implementing this method. Copy/paste this method: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java"><SPAN class="code-keyword">protected</SPAN> void processInOut(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) <SPAN class="code-keyword">throws</SPAN> Exception {
+	SourceTransformer sourceTransformer = <SPAN class="code-keyword">new</SPAN> SourceTransformer();
+	<SPAN class="code-object">String</SPAN> inMessage = sourceTransformer.toString(in.getContent()); 
+	out.setContent(<SPAN class="code-keyword">new</SPAN> StringSource(<SPAN class="code-quote">&quot;&lt;hello&gt;Hello World! Message [&quot;</SPAN> + inMessage + <SPAN class="code-quote">&quot;] contains [&quot;</SPAN> + inMessage.getBytes().length + <SPAN class="code-quote">&quot;] bytes&lt;/hello&gt;.&quot;</SPAN>));
+}</PRE>
+</DIV></DIV>
+
+<P>Adding this method will require the import of the following classes: </P>
+
+<UL>
+	<LI><TT>org.apache.servicemix.jbi.jaxp.SourceTransformer</TT></LI>
+	<LI><TT>org.apache.servicemix.jbi.jaxp.StringSource</TT></LI>
+</UL>
+
+
+<P>These classes can be found in the <SPAN class="nobr"><A href="http://fisheye3.cenqua.com/browse/servicemix/trunk/servicemix-core/" title="Visit page outside Confluence" rel="nofollow">servicemix-core<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> project.</P>
+
+<P>This method is the logic for the Hello World SE. We&apos;re not doing anything complex here at all in order to keep this tutorial very simple. Now it&apos;s time to test the component. </P>
+
+<H2><A name="CopyofHelloWorld-BC-TestingtheHelloWorldComponent"></A>Testing the Hello World Component</H2>
+
+<P>Thanks to the archetype, testing the component is very easy because it already created a test. The only change we&apos;ll make is to the string being sent by the client code. In the <TT>src/test/java</TT> directory is the <TT>org.apache.servicemix.samples.helloworld.se.MySpringComponentTest</TT> test. Simply open this test and change line #36 from this: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">me.getInMessage().setContent(<SPAN class="code-keyword">new</SPAN> StringSource(<SPAN class="code-quote">&quot;&lt;hello&gt;world&lt;/hello&gt;&quot;</SPAN>));</PRE>
+</DIV></DIV>
+
+<P>to something more meaningful, like this: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">me.getInMessage().setContent(<SPAN class="code-keyword">new</SPAN> StringSource(<SPAN class="code-quote">&quot;&lt;hello&gt;Ski Colorado!&lt;/hello&gt;&quot;</SPAN>));</PRE>
+</DIV></DIV>
+
+<P>To execute the test, simply run the Maven <TT>install</TT> goal from within the <TT>hello-world-se-su</TT> directory like so: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">$ mvn install</PRE>
+</DIV></DIV>
+
+<P>Below is the output that will print to the console: </P>
+
+<DIV class="preformatted"><DIV class="preformattedContent">
+<PRE>[INFO] Scanning for projects...
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building A custom project
+[INFO]    task-segment: [install]
+[INFO] ----------------------------------------------------------------------------
+[INFO] [xbean:mapping {execution: default}]
+Checking: org.apache.servicemix.samples.helloworld.se.MyComponent
+Checking: org.apache.servicemix.samples.helloworld.se.MyEndpoint
+[INFO] Generating META-INF properties file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/services/org/apache/xbean/spring/http/
+org.apache.servicemix.samples.helloworld.se/1.0 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating Spring 2.0 handler mapping: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/spring.handlers 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating Spring 2.0 schema mapping: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/spring.schemas 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating HTML documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.html 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating XSD file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating WIKI documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.wiki 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+Warning, could not load class: org.apache.servicemix.samples.helloworld.se.MyEndpoint
+[INFO] ...done.
+Downloading: http://repo.mergere.com/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
+[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
+Downloading: http://repo.mergere.com/maven2/wss4j/wss4j/1.5.0/wss4j-1.5.0.pom
+[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
+[INFO] [jbi:generate-jbi-component-descriptor]
+[INFO] Generating jbi.xml
+[INFO] [resources:resources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:compile]
+[INFO] Nothing to compile - all classes are up to date
+[INFO] [resources:testResources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:testCompile]
+[INFO] Nothing to compile - all classes are up to date
+[INFO] [surefire:test]
+[INFO] Surefire report directory: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/surefire-reports
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.apache.servicemix.samples.helloworld.se.MySpringComponentTest
+&lt;hello&gt;Hello World! Message [&lt;hello&gt;Ski Colorado!&lt;/hello&gt;] contains [28] bytes&lt;/hello&gt;.
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.487 sec
+
+Results :
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+[INFO] [jar:jar]
+[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT.jar
+[INFO] [jbi:jbi-component]
+[INFO] Generating installer /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] [install:install]
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT.jar to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT.jar
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT.xsd
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.html to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT-schema.html
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 16 seconds
+[INFO] Finished at: Mon Jan 15 13:19:51 MST 2007
+[INFO] Final Memory: 13M/24M
+[INFO] ------------------------------------------------------------------------
+</PRE>
+</DIV></DIV>
+
+<P>Notice that not only do we see that the build was successful, but also note the text in the output above that was printed by the test (<B>&lt;hello&gt;Hello World! Message [&lt;hello&gt;Ski Colorado!&lt;/hello&gt;] contains [28] bytes.&lt;/hello&gt;</B>). This is the message we were expecting to be output from the test. So if you see this, you just wrote a JBI component and tested it successfully. Now this SU needs to be wrapped in a SA so it can be deployed to the JBI container. </P>
+
+<H2><A name="CopyofHelloWorld-BC-WrappingtheServiceUnitinaServiceAssembly"></A>Wrapping the Service Unit in a Service Assembly </H2>
+
+<P>The component we created above and packaged as a SU cannot be directly deployed to a JBI container until it&apos;s wrapped in a SA. This can be done by creating a SA with a dependency on the SA. From within the <TT>hello-world-smx</TT> directory, execute the following commands to create the project for the SA: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">$ pwd
+/Users/bsnyder/src/hello-world-smx/hello-world-se-su
+$ cd .. 
+$ mvn archetype:create \
+    -DarchetypeGroupId=org.apache.servicemix.tooling \
+    -DarchetypeArtifactId=servicemix-service-assembly \
+    -DarchetypeVersion=3.1-incubating-SNAPSHOT \
+    -DgroupId=org.apache.servicemix.samples.helloworld \
+    -DartifactId=hello-world-sa</PRE>
+</DIV></DIV>
+
+<P>Upon successful execution of the <TT>archetype:create</TT> goals, look for the BUILD SUCCESSFUL output as displayed below: </P>
+
+<DIV class="preformatted"><DIV class="preformattedContent">
+<PRE>[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: &apos;archetype&apos;.
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building Maven Default Project
+[INFO]    task-segment: [archetype:create] (aggregator-style)
+[INFO] ----------------------------------------------------------------------------
+[INFO] Setting property: classpath.resource.loader.class =&gt; &apos;org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader&apos;.
+[INFO] Setting property: velocimacro.messages.on =&gt; &apos;false&apos;.
+[INFO] Setting property: resource.loader =&gt; &apos;classpath&apos;.
+[INFO] Setting property: resource.manager.logwhenfound =&gt; &apos;false&apos;.
+[INFO] ************************************************************** 
+[INFO] Starting Jakarta Velocity v1.4
+[INFO] RuntimeInstance initializing.
+[INFO] Default Properties File: org/apache/velocity/runtime/defaults/velocity.properties
+[INFO] Default ResourceManager initializing. (class org.apache.velocity.runtime.resource.ResourceManagerImpl)
+[INFO] Resource Loader Instantiated: org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
+[INFO] ClasspathResourceLoader : initialization starting.
+[INFO] ClasspathResourceLoader : initialization complete.
+[INFO] ResourceCache : initialized. (class org.apache.velocity.runtime.resource.ResourceCacheImpl)
+[INFO] Default ResourceManager initialization complete.
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Literal
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Macro
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Parse
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Include
+[INFO] Loaded System Directive: org.apache.velocity.runtime.directive.Foreach
+[INFO] Created: 20 parsers.
+[INFO] Velocimacro : initialization starting.
+[INFO] Velocimacro : adding VMs from VM library template : VM_global_library.vm
+[ERROR] ResourceManager : unable to find resource &apos;VM_global_library.vm&apos; in any resource loader.
+[INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: 
+Unable to find resource &apos;VM_global_library.vm&apos;
+[INFO] Velocimacro :  VM library template macro registration complete.
+[INFO] Velocimacro : allowInline = true : VMs can be defined inline in templates
+[INFO] Velocimacro : allowInlineToOverride = false : VMs defined inline may NOT replace previous VM definitions
+[INFO] Velocimacro : allowInlineLocal = false : VMs defined inline will be  global in scope if allowed.
+[INFO] Velocimacro : initialization complete.
+[INFO] Velocity successfully started.
+[INFO] [archetype:create]
+[INFO] Defaulting package to group ID: org.apache.servicemix.samples.helloworld
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating Archetype: servicemix-service-assembly:3.1-incubating-SNAPSHOT
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: org.apache.servicemix.samples.helloworld
+[INFO] Parameter: packageName, Value: org.apache.servicemix.samples.helloworld
+[INFO] Parameter: basedir, Value: /Users/bsnyder/src/hello-world-smx
+[INFO] Parameter: package, Value: org.apache.servicemix.samples.helloworld
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[INFO] Parameter: artifactId, Value: hello-world-sa
+[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 71,column 18] : 
+${servicemix-version} is not a valid reference.
+[INFO] ********************* End of debug info from resources from generated POM ***********************
+[INFO] Archetype created in dir: /Users/bsnyder/src/hello-world-smx/hello-world-sa
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 2 seconds
+[INFO] Finished at: Fri Jan 05 23:40:32 MST 2007
+[INFO] Final Memory: 4M/8M
+[INFO] ------------------------------------------------------------------------
+</PRE>
+</DIV></DIV>
+
+<P>The <TT>hello-world-smx</TT> directory should now contain the following two directories: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">$ ls 
+hello-world-sa hello-world-se-su</PRE>
+</DIV></DIV>
+
+<P>If you see the above directories, proceed to the next step below. If instead you see the BUILD FAILED output, you&apos;ll need to analyze the rest of the output to troubleshoot the issue. Assistance with any issue you might experience is available from the ServiceMix community via the <A href="mailing-lists.html" title="Mailing Lists">ServiceMix mailing lists archive</A>. </P>
+
+<P>Now that we have a project for the SA, we need to edit the POM so that the project depends upon the JBI component we created above. This can be done by editing the POM for the SA to add a dependency upon the <TT>hello-world-se-su</TT> as listed below: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">&lt;dependency&gt;
+  &lt;groupId&gt;org.apache.servicemix.samples.helloworld.se&lt;/groupId&gt;
+  &lt;artifactId&gt;hello-world-se-su&lt;/artifactId&gt;
+  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
+&lt;/dependency&gt;</PRE>
+</DIV></DIV>
+
+<P>Upon adding this dependency to the POM, build the project using the command below: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">$ cd hello-world-sa
+$ mvn install</PRE>
+</DIV></DIV>
+
+<DIV class="preformatted"><DIV class="preformattedContent">
+<PRE>[INFO] Scanning for projects...
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building A custom project
+[INFO]    task-segment: [install]
+[INFO] ----------------------------------------------------------------------------
+Downloading: http://repo.mergere.com/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
+[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
+Downloading: http://repo.mergere.com/maven2/wss4j/wss4j/1.5.0/wss4j-1.5.0.pom
+[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
+[INFO] [jbi:generate-jbi-service-assembly-descriptor]
+[INFO] Generating jbi.xml
+[INFO] [resources:resources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:compile]
+[INFO] No sources to compile
+[INFO] [resources:testResources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:testCompile]
+[INFO] No sources to compile
+[INFO] [surefire:test]
+[INFO] No tests to run.
+[INFO] [jbi:jbi-service-assembly]
+[INFO] [jar:jar]
+[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-sa/target/hello-world-sa-1.0-SNAPSHOT.jar
+[INFO] [install:install]
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-sa/target/hello-world-sa-1.0-SNAPSHOT.jar to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/hello-world-sa/1.0-SNAPSHOT/hello-world-sa-1.0-SNAPSHOT.zip
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 10 seconds
+[INFO] Finished at: Fri Jan 05 23:53:19 MST 2007
+[INFO] Final Memory: 12M/22M
+[INFO] ------------------------------------------------------------------------
+</PRE>
+</DIV></DIV>
+
+<H2><A name="CopyofHelloWorld-BC-IncorporatingtheProjectsIntoaTopLevelPOM"></A>Incorporating the Projects Into a Top Level POM</H2>
+
+<P>Now that we have created the SU and SA projects, a top level <TT>pom.xml</TT> must be manually created and made aware of each subproject. This will allow all the projects to be built automatically without having to build each project in order manually. Maven will discover all the projects and build them in the proper order. In the <TT>hello-world-se-su</TT> directory, create a file named <TT>pom.xml</TT> containing the following content:</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">&lt;?xml version=<SPAN class="code-quote">&quot;1.0&quot;</SPAN> encoding=<SPAN class="code-quote">&quot;UTF-8&quot;</SPAN>?&gt;
+&lt;project xmlns=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//maven.apache.org/POM/4.0.0&quot;</SPAN> 
+</SPAN>    xmlns:xsi=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//www.w3.org/2001/XMLSchema-instance&quot;</SPAN>
+</SPAN>    xsi:schemaLocation=<SPAN class="code-quote">&quot;http:<SPAN class="code-comment">//maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;</SPAN>&gt;
+</SPAN>
+  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
+
+  &lt;groupId&gt;org.apache.servicemix.samples.helloworld&lt;/groupId&gt;
+  &lt;artifactId&gt;hello-world-smx&lt;/artifactId&gt;
+  &lt;packaging&gt;pom&lt;/packaging&gt;
+  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
+  &lt;name&gt;Hello World JBI Component&lt;/name&gt;
+
+  &lt;modules&gt;
+    &lt;module&gt;hello-world-sa&lt;/module&gt;
+    &lt;module&gt;hello-world-se-su&lt;/module&gt;
+  &lt;/modules&gt;
+
+&lt;/project&gt;</PRE>
+</DIV></DIV>
+
+<P>This POM will allow the example to be easily folded in to the ServiceMix samples. The <TT>&lt;modules&gt;</TT> element denotes the other projects that were created above using the Maven archetypes. Once the <TT>pom.xml</TT> file from above is saved into the <TT>hello-world-smx</TT> directory, you should now see the following: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">$ ls 
+hello-world-sa hello-world-se-su pom.xml</PRE>
+</DIV></DIV>
+
+<P>All projects can now be built using the following command on the command-line from the top level <TT>hello-world-smx</TT> directory: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">$ mvn clean install</PRE>
+</DIV></DIV>
+
+<P>The command above should display the output below: </P>
+
+<DIV class="preformatted"><DIV class="preformattedContent">
+<PRE>[INFO] Scanning for projects...
+[INFO] Reactor build order: 
+[INFO]   A custom project
+[INFO]   A custom project
+[INFO]   Hello World JBI Component
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building A custom project
+[INFO]    task-segment: [clean, install]
+[INFO] ----------------------------------------------------------------------------
+[INFO] [clean:clean]
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/classes
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/test-classes
+[INFO] [xbean:mapping {execution: default}]
+Checking: org.apache.servicemix.samples.helloworld.se.MyComponent
+Checking: org.apache.servicemix.samples.helloworld.se.MyEndpoint
+[INFO] Generating META-INF properties file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/services/org/apache/xbean/spring/http/
+org.apache.servicemix.samples.helloworld.se/1.0 for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating Spring 2.0 handler mapping: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/spring.handlers 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating Spring 2.0 schema mapping: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/META-INF/spring.schemas 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating HTML documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.html 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating XSD file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+[INFO] Generating WIKI documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.wiki 
+for namespace: http://org.apache.servicemix.samples.helloworld.se/1.0
+Warning, could not load class: org.apache.servicemix.samples.helloworld.se.MyEndpoint
+[INFO] ...done.
+Downloading: http://repo.mergere.com/maven2/xml-security/xmlsec/1.3.0/xmlsec-1.3.0.pom
+[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
+Downloading: http://repo.mergere.com/maven2/wss4j/wss4j/1.5.0/wss4j-1.5.0.pom
+[WARNING] Unable to get resource from repository central (http://repo1.maven.org/maven2)
+[INFO] [jbi:generate-jbi-component-descriptor]
+[INFO] Generating jbi.xml
+[INFO] [resources:resources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:compile]
+Compiling 3 source files to /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/classes
+[INFO] [resources:testResources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:testCompile]
+Compiling 1 source file to /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/test-classes
+[INFO] [surefire:test]
+[INFO] Surefire report directory: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/surefire-reports
+
+-------------------------------------------------------
+ T E S T S
+-------------------------------------------------------
+Running org.apache.servicemix.samples.helloworld.se.MySpringComponentTest
+&lt;hello&gt;Hello World! Message [&lt;hello&gt;Ski Colorado!&lt;/hello&gt;] contains [28] bytes&lt;/hello&gt;.
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.464 sec
+
+Results :
+Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
+
+[INFO] [jar:jar]
+[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT.jar
+[INFO] [jbi:jbi-component]
+[INFO] Generating installer /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] [install:install]
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT.jar to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT.jar
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT.xsd
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/xbean/hello-world-se-su.xsd.html to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT-schema.html
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-se-su/target/hello-world-se-su-1.0-SNAPSHOT-installer.zip to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/se/hello-world-se-su/1.0-SNAPSHOT/hello-world-se-su-1.0-SNAPSHOT-installer.zip
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building A custom project
+[INFO]    task-segment: [clean, install]
+[INFO] ----------------------------------------------------------------------------
+[INFO] [clean:clean]
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/hello-world-sa/target
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/hello-world-sa/target/classes
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/hello-world-sa/target/test-classes
+[INFO] [jbi:generate-jbi-service-assembly-descriptor]
+[INFO] Generating jbi.xml
+[INFO] [resources:resources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:compile]
+[INFO] No sources to compile
+[INFO] [resources:testResources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [compiler:testCompile]
+[INFO] No sources to compile
+[INFO] [surefire:test]
+[INFO] No tests to run.
+[INFO] [jbi:jbi-service-assembly]
+[INFO] [jar:jar]
+[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-sa/target/hello-world-sa-1.0-SNAPSHOT.jar
+[INFO] [install:install]
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-sa/target/hello-world-sa-1.0-SNAPSHOT.jar to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/hello-world-sa/1.0-SNAPSHOT/hello-world-sa-1.0-SNAPSHOT.zip
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building Hello World JBI Component
+[INFO]    task-segment: [clean, install]
+[INFO] ----------------------------------------------------------------------------
+[INFO] [clean:clean]
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/target
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/target/classes
+[INFO] Deleting directory /Users/bsnyder/src/hello-world-smx/target/test-classes
+[INFO] [site:attach-descriptor]
+[INFO] [install:install]
+[INFO] Installing /Users/bsnyder/src/hello-world-smx/pom.xml to 
+/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/hello-world-smx/1.0-SNAPSHOT/hello-world-smx-1.0-SNAPSHOT.pom
+[INFO] 
+[INFO] 
+[INFO] ------------------------------------------------------------------------
+[INFO] Reactor Summary:
+[INFO] ------------------------------------------------------------------------
+[INFO] A custom project ...................................... SUCCESS [17.091s]
+[INFO] A custom project ...................................... SUCCESS [2.465s]
+[INFO] Hello World JBI Component ............................. SUCCESS [1.552s]
+[INFO] ------------------------------------------------------------------------
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 22 seconds
+[INFO] Finished at: Mon Jan 15 13:30:59 MST 2007
+[INFO] Final Memory: 14M/28M
+[INFO] ------------------------------------------------------------------------
+</PRE>
+</DIV></DIV> 
+
+<P>As long as you see the BUILD SUCCESSFUL message in the output continue to the next section to give each project a unique name. </P>
+
+<H2><A name="CopyofHelloWorld-BC-GiveEachoftheMavenSubprojectsaName"></A>Give Each of the Maven Subprojects a Name </H2>
+
+<P>Notice in the output above that there are a two projects named <EM>A custom project</EM>. This is because the archetypes create projects with this generic name. Let&apos;s give each project a unique name via each component&apos;s <TT>pom.xml</TT> file. This name will allow Maven&apos;s output to denote a component&apos;s name in its output making our development work a bit easier. To name each project, simply edit each <TT>pom.xml</TT> and replace <TT>&lt;name&gt;A custom project&lt;/name&gt;</TT> with an appropriate name. Below are the instructions for naming each component&apos;s project: </P>
+
+<UL>
+	<LI>Edit <TT>hello-world-sa/pom.xml</TT> and replace <TT>&lt;name&gt;A custom project&lt;/name&gt;</TT> with <TT>&lt;name&gt;Hello World Service Assembly&lt;/name&gt;</TT></LI>
+	<LI>Edit <TT>hello-world-se-su/pom.xml</TT> and replace <TT>&lt;name&gt;A custom project&lt;/name&gt;</TT> with <TT>&lt;name&gt;Hello World SE Service Unit&lt;/name&gt;</TT></LI>
+</UL>
+
+
+<P>Now when the projects are built you will no longer see a project named <EM>A custom project</EM>. Instead you&apos;ll now see <EM>Hello World SE Service Unit</EM> and <EM>Hello World Service Assembly</EM>. Rebuild the projects again using the <TT>mvn clean install</TT> command on the command-line to see the change. </P>
+
+<H3><A name="CopyofHelloWorld-BC-DeployingtheComponent"></A>Deploying the Component </H3>
+
+<P>Now that the SA is built, we&apos;re ready to deploy it to the JBI container. </P>
+
+<P><EM>This is a work in progress. I will finish this up very soon.</EM></P>
+
+<HR>
+
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="noteMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">Deploying Component Dependencies</B><BR>
+<P>When working with the <TT>jbi:projectDeploy</TT> you may want to disable dependency deployment. When deploying to a server which has other components sharing these dependencies, they can cause problems during deployment. To stop the Maven JBI plugin from undeploying and redeploying dependencies each time, alter its configuration by disabling the deployment of dependencies using the following: </P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">&lt;build&gt;
+&lt;plugins&gt;
+  &lt;plugin&gt;
+    &lt;artifactId&gt;jbi-maven-plugin&lt;/artifactId&gt;
+    &lt;configuration&gt;
+      &lt;deployDependencies&gt;<SPAN class="code-keyword">false</SPAN>&lt;/deployDependencies&gt;
+    &lt;/configuration&gt;
+  &lt;/plugin&gt;
+&lt;/plugins&gt;
+&lt;/build&gt;</PRE>
+</DIV></DIV>
+
+<P>The configuration above introduces the <TT>deployDependencies</TT> element to the Maven JBI plugin and sets it to false. </P>
+
+<P>For a few more configurable options on the Maven JBI plugin, see also <SPAN class="nobr"><A href="https://issues.apache.org/activemq/browse/SM-605" title="Visit page outside Confluence" rel="nofollow">Ability to configure jbi:projectDeploy goal to exclude updating dependencies<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>.</P></TD></TR></TABLE>
+
+<TABLE cellpadding="5" width="85%" cellspacing="8px" class="noteMacro" border="0" align="center"><COLGROUP><COL width="24"><COL></COLGROUP><TR><TD valign="top"><IMG src="http://goopen.org/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></TD><TD><B class="strong">TODO</B><BR>
+<P>The default implementation of the component accepts InOut MEPs (ADD<BR>
+LINK TO FURTHER READING CONCERNING MEPs) and return the input content<BR>
+as the out message. This is already nearly what we want.</P>
+
+<P> OUTLINE for further work:</P>
+<UL>
+	<LI>Get Messages</LI>
+	<LI>read Messages</LI>
+	<LI>count the bytes<BR>
+Maybe easiest by XSLT endpoint (can be used to apply an XSLT stylesheet to the incoming exchange and will return the transformed result as the output message.) see [ servicemix-saxon&#124;servicemix-saxon]</LI>
+	<LI>send a message back</LI>
+	<LI>Configure SA so that the example receives messages<BR>
+create &amp; populate<BR>
+C:\hello-world-SE-SU-SA\hello-world-SU\src\main\resources\servicemix.xml</LI>
+	<LI>as MyDeployer extends AbstractXBeanDeployer create xbean.xml for SU</LI>
+	<LI>make something send messages (eg quartz timer, HTTP POST,...) and dump the answer (eg TraceComponent, FireWriter, EIP,...)</LI>
+	<LI>add a chapter what user may do now / &quot;how to continue when having the working example&quot;</LI>
+</UL>
+
+
+<P>Classpath for SU to include manually till v3.1, see <SPAN class="nobr"><A href="http://mail-archives.apache.org/mod_mbox/geronimo-servicemix-users/200610.mbox/%3Cb23ecedc0610042315k30c03d67y240be0bb97358784@mail.gmail.com%3E" title="Visit page outside Confluence" rel="nofollow">mail<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P>
+
+<P>manually editing <SPAN class="nobr"><A href="working-with-service-units.html" title="Visit page outside Confluence" rel="nofollow">http://goopen.org/confluence/display/SM/Working+with+Service+Units<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN><BR>
+manually editing <SPAN class="nobr"><A href="http://www.servicemix.org/site/working-with-service-assemblies.html" title="Visit page outside Confluence" rel="nofollow">http://www.servicemix.org/site/working-with-service-assemblies.html<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN><BR>
+use the SU archetype like in <SPAN class="nobr"><A href="http://www.servicemix.org/site/creating-a-protocol-bridge.html" title="Visit page outside Confluence" rel="nofollow">http://www.servicemix.org/site/creating-a-protocol-bridge.html<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN><BR>
+use the SA archetype like in <SPAN class="nobr"><A href="http://www.servicemix.org/site/creating-a-protocol-bridge.html" title="Visit page outside Confluence" rel="nofollow">http://www.servicemix.org/site/creating-a-protocol-bridge.html<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P>
+
+<P>INS When to use this JBI Component<BR>
+INS Using the component that you created</P>
+
+<P>provide exact position in the SVN&#33;<BR>
+/samples/hello-world-SE-SU-SA/<BR>
+integrate from SVN source like it is done at Configuration at <SPAN class="nobr"><A href="http://www.servicemix.org/site/visualisation.html" title="Visit page outside Confluence" rel="nofollow">http://www.servicemix.org/site/visualisation.html<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P>
+
+<P>maybe moving the content of overlapping existing docus to this new tut and - where appropriate - delete the old ones (only leaving a redirect).<BR>
+<SPAN class="nobr"><A href="http://www.servicemix.org/site/notes-on-creating-jbi-component-using-maven2.html" title="Visit page outside Confluence" rel="nofollow">http://www.servicemix.org/site/notes-on-creating-jbi-component-using-maven2.html<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> version14<BR>
+<SPAN class="nobr"><A href="http://www.servicemix.org/site/creating-a-standard-jbi-component.html" title="Visit page outside Confluence" rel="nofollow">http://www.servicemix.org/site/creating-a-standard-jbi-component.html<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> version26<BR>
+are already fully incorporated in the mentioned versions, so delete content and point from there to here (and delete note at the very top)</P>
+
+<P> This shall already include everything stated at<BR>
+<SPAN class="nobr"><A href="http://www.servicemix.org/site/maven-jbi-plugin.html#MavenJBIplugin-GettingStarted" title="Visit page outside Confluence" rel="nofollow">http://www.servicemix.org/site/maven-jbi-plugin.html#MavenJBIplugin-GettingStarted<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN><BR>
+and<BR>
+<SPAN class="nobr"><A href="http://www.servicemix.org/site/working-with-components.html" title="Visit page outside Confluence" rel="nofollow">http://www.servicemix.org/site/working-with-components.html<SUP><IMG class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></P>
+
+<P>provide additional reading<BR>
+<A href="creating-a-protocol-bridge.html" title="Creating a protocol bridge">Creating a protocol bridge</A>.for a &quot;bigger&quot; example<BR>
+The <A href="examples.html" title="Examples">examples</A> page lists examples providing more information, showing further possibilities and components.</P></TD></TR></TABLE>
+
+<H2><A name="CopyofHelloWorld-BC-AdditionalResources"></A>Additional Resources </H2>
+
+<UL>
+	<LI><A href="creating-a-standard-jbi-component.html" title="Creating a Standard JBI Component">Creating a Standard JBI Component</A></LI>
+	<LI><A href="notes-on-creating-jbi-component-using-maven2.html" title="Notes on Creating JBI Component using maven2">Notes on Creating JBI Component using maven2</A></LI>
+	<LI><A href="roadmap-for-a-perspective-servicemix-developer.html" title="Roadmap for a perspective Servicemix developer">Roadmap for a perspective Servicemix developer</A></LI>
+</UL>
+</DIV>
+          
+                  </DIV>
+        </TD>
+      </TR>
+      </TABLE>     
+      </DIV>
+    </DIV>
+    <DIV id="site-footer">
+          Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=bsnyder">Bruce Snyder</A>,
+    last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=bsnyder">Bruce Snyder</A> on Jan 15, 2007
+                  
+      (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=15306">edit page</A>)
+    </DIV>
+
+  </BODY>
+
+</HTML>
\ No newline at end of file