servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache ServiceMix: Hello World - BC (page edited)
Date Fri, 04 Apr 2008 11:31:01 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence" />
    <style type="text/css">
    <!--
    body, p, td, table, tr, .bodytext, .stepfield {
	font-family: Verdana, arial, sans-serif;
	font-size: 11px;
	line-height: 16px;
	color: #000000;
	font-weight: normal;
}
#PageContent {
	text-align: left;
	background-color: #fff;
	padding: 0px;
	margin: 0px;
    padding-bottom:20px;
}
/*
** when this stylesheet is used for the Tiny MCE Wysiwyg editor's edit area, we can't
** use an id=PageContent or class=wiki-content, so we must
** set the body style to that used for PageContent, and p to that used for wiki-content.
*/

body {
	margin: 0px;
	padding: 0px;
	text-align: center;
    background-color: #f0f0f0;
}

@media print {

body {
    background-color: #fff;
}

}

.monospaceInput {
    font:12px monospace
}

.wiki-content p, .commentblock p {
    margin: 16px 0px 16px 0px;
    padding: 0px;
}

.wiki-content-preview {
    padding: 5px;
    border-left: 1px solid #3c78b5;
    border-right: 1px solid #3c78b5;
}

ul, ol {
    margin-top: 2px;
    margin-bottom: 2px;
    padding-top: 0px;
    padding-bottom: 0px;
}

pre {
    padding: 0px;
    margin-top: 5px;
    margin-left: 15px;
    margin-bottom: 5px;
    margin-right: 5px;
    text-align: left;
}

.helpheading {
    font-weight: bold;
    background-color: #D0D9BD;
        border-bottom: 1px solid #3c78b5;
        padding: 4px 4px 4px 4px;
        margin: 0px;
        margin-top: 10px;
}
.helpcontent {
        padding: 4px 4px 20px 4px;
    background-color: #f5f7f1;
}

.code {
 	border: 1px dashed #3c78b5;
    font-size: 11px;
	font-family: Courier;
    margin: 10px;
	line-height: 13px;
}

.focusedComment {
    background: #ffffce;
}

.commentBox, .focusedComment {
    padding: 10px;
    margin: 5px 0 5px 0;
    border: 1px #bbb solid;
}

.codeHeader {
    background-color: #f0f0f0;
 	border-bottom: 1px dashed #3c78b5;
    padding: 3px;
	text-align: center;
}

.codeContent {
    text-align: left;
    background-color: #f0f0f0;
    padding: 3px;
}

.preformatted {
 	border: 1px dashed #3c78b5;
    font-size: 11px;
	font-family: Courier;
    margin: 10px;
	line-height: 13px;
}

.preformattedHeader {
    background-color: #f0f0f0;
 	border-bottom: 1px dashed #3c78b5;
    padding: 3px;
	text-align: center;
}

.preformattedContent {
    background-color: #f0f0f0;
    padding: 3px;
}

.panel {
 	border: 1px dashed #3c78b5;
    margin: 10px;
    margin-top: 0px;
}

.panelHeader {
    background-color: #f0f0f0;
 	border-bottom: 1px dashed #3c78b5;
    padding: 3px;
	text-align: center;
}

.panelContent {
    background-color: #f0f0f0;
    padding: 5px;
}

.anonymousAlert {
    background-color: #f0f0f0;
 	border: 1px dashed red;
    font-size: 11px;
    padding: 10px 5px 10px 5px;
    margin: 4px;
	line-height: 13px;
}

.lockAlert {
    background-color: #f0f0f0;
    width: 50%;
 	border: 1px dashed red;
    font-size: 11px;
    padding: 10px 5px 10px 5px;
    margin: 4px;
	line-height: 13px;
}


.code-keyword {
  color: #000091;
  background-color: inherit;
}

.code-object {
  color: #910091;
  background-color: inherit;
}

.code-quote {
  color: #009100;
  background-color: inherit;
}

.code-comment {
  color: #808080;
  background-color: inherit;
}


.code-xml .code-keyword {
  color: inherit;
  font-weight: bold;
}

.code-tag {
  color: #000091;
  background-color: inherit;
}

.breadcrumbs {
    background-color: #f0f0f0;
 	border-color: #3c78b5;
	border-width: 1px 0px 1px 0px;
	border-style: solid;
    font-size: 11px;
    padding: 3px 0px 3px 0px;
}

.navmenu {
    border: 1px solid #ccc;
}

.menuheading {
    font-weight: bold;
    background-color: #f0f0f0;
 	border-bottom: 1px solid #3c78b5;
	padding: 4px 4px 2px 4px;
}

.menuitems {
	padding: 4px 4px 20px 4px;
}

.rightpanel {
    border-left: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

#helpheading {
    text-align: left;
    font-weight: bold;
    background-color: #D0D9BD;
 	border-bottom: 1px solid #3c78b5;
	padding: 4px 4px 4px 4px;
	margin: 0px;
}
#helpcontent {
	padding: 4px 4px 4px 4px;
    background-color: #f5f7f1;
}
.helptab-unselected {
    font-weight: bold;
	padding: 5px;
    background-color: #f5f7f1;
}
.helptab-selected {
    font-weight: bold;
    background-color: #D0D9BD;
	padding: 5px;
}
.helptabs {
    margin: 0px;
    background-color: #f5f7f1;
	padding: 5px;
}
.infopanel-heading {
    font-weight: bold;
	padding: 4px 0px 2px 0px;
}

.pagebody {
}

.pageheader {
	padding: 5px 5px 5px 0px;
 	border-bottom: 1px solid #3c78b5;
}

.pagetitle {
	font-size: 22px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	color: #003366;
}

.newpagetitle {
    color: #ccc !important;
}

.steptitle {
	font-size: 18px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	color: #003366;
	margin-bottom: 7px;
}

.substeptitle {
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: #003366;
    margin: 2px 4px 4px 4px;
    padding: 2px 4px 1px 4px;
}

.stepdesc {
    font-family: Verdana, arial, sans-serif;
	font-size: 11px;
	line-height: 16px;
	font-weight: normal;
    color: #666666;
    margin-top: 7px;
    margin-bottom: 7px;
}

.steplabel {
    font-weight: bold;
    margin-right: 4px;
    color: black;
    float: left;
    width: 15%;
    text-align: right;
}

.stepfield {
    background: #f0f0f0;
    padding: 5px;
}

.submitButtons{
    margin-top:5px;
    text-align:right;
}

.formtitle {
	font-size: 12px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	color: #003366;
}

.sectionbottom {
    border-bottom: 1px solid #3c78b5;
}

.topRow {
    border-top: 2px solid #3c78b5;
}

.tabletitle {
	font-size: 14px;
	font-weight: bold;
	font-family: Arial, sans-serif;
    padding: 3px 0px 2px 0px;
    margin: 8px 4px 2px 0px;
	color: #003366;
	border-bottom: 2px solid #3c78b5;
}
.pagesubheading {
    color: #666666;
    font-size: 10px;
    padding: 0px 0px 5px 0px;
}

HR {
	color: 3c78b5;
	height: 1;
}

A:link, A:visited, A:active, A:hover {
	color: #003366;
}

h1 A:link, h1 A:visited, h1 A:active {
	text-decoration: none;
}

h1 A:hover {
    border-bottom: 1px dotted #003366;
}

.wiki-content > :first-child, .commentblock > :first-child {
    margin-top: 3px;
}

.logocell {
    padding: 10px;
}

input {
	font-family: verdana, geneva, arial, sans-serif;
	font-size: 11px;
	color: #000000;
}

textarea, textarea.editor {
	font-family: verdana, geneva, arial, sans-serif;
	font-size: 11px;
	color: #333333;
}

/* use logoSpaceLink instead.
.spacenametitle {
	font: 21px/31px Impact, Arial, Helvetica;
    font-weight: 100;
    color: #999999;
	margin: 0px;
}
.spacenametitle img {
  margin: 0 0 -4px 0;
}
.spacenametitle a {
    text-decoration: none;
    color: #999999;
}
.spacenametitle a:visited {
    text-decoration: none;
    color: #999999;
}*/

.spacenametitle-printable {
	font: 20px/25px Impact, Arial, Helvetica;
    font-weight: 100;
    color: #999999;
	margin: 0px;
}
.spacenametitle-printable a {
    text-decoration: none;
    color: #999999;
}
.spacenametitle-printable a:visited {
    text-decoration: none;
    color: #999999;
}

.blogDate {
	font-weight: bold;
	text-decoration: none;
	color: black;
}

.blogSurtitle {
    background: #f0f0f0;
 	border: 1px solid #ddd;
	padding: 3px;
	margin: 1px 1px 10px 1px;
}

.blogHeading {
    font-size: 20px;
    line-height: normal;
    font-weight: bold;
    padding: 0px;
    margin: 0px;
}

.blogHeading a {
   text-decoration: none;
   color: black;
}

.endsection {
	align: right;
	color: #666666;
	margin-top: 10px;
}
.endsectionleftnav {
	align: right;
	color: #666666;
	margin-top: 10px;
}

h1 {
	font-size: 24px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	color: #003366;
 	border-bottom: 1px solid #3c78b5;
	padding: 2px;
	margin: 36px 0px 4px 0px;
}

h2 {
	font-size: 18px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
 	border-bottom: 1px solid #3c78b5;
	padding: 2px;
	margin: 27px 0px 4px 0px;
}

h3 {
	font-size: 14px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px;
	margin: 21px 0px 4px 0px;
}

h4 {
	font-size: 12px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px;
	margin: 18px 0px 4px 0px;
}

h4.search {
	font-size: 12px;
	line-height: normal;
	font-weight: normal;
	background-color: #f0f0f0;
	padding: 4px;
	margin: 18px 0px 4px 0px;
}

h5 {
	font-size: 10px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px;
	margin: 14px 0px 4px 0px;
}

h6 {
	font-size: 8px;
	line-height: normal;
	font-weight: bold;
	background-color: #f0f0f0;
	padding: 2px;
	margin: 14px 0px 4px 0px;
}

.smallfont {
    font-size: 10px;
}
.descfont {
    font-size: 10px;
    color: #666666;
}
.smallerfont {
    font-size: 9px;
}
.smalltext {
    color: #666666;
    font-size: 10px;
}
.smalltext a {
    color: #666666;
}
.smalltext-blue {
    color: #3c78b5;
    font-size: 10px;
}
.surtitle {
    margin-left: 1px;
    margin-bottom: 5px;
    font-size: 14px;
    color: #666666;
}

/* css hack found here:  http://www.fo3nix.pwp.blueyonder.co.uk/tutorials/css/hacks/ */
.navItemOver { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #003366; cursor: hand; voice-family: '\'}\''; voice-family:inherit; cursor: pointer;}
.navItemOver a { color: #ffffff; background-color:#003366; text-decoration: none; }
.navItemOver a:visited { color: #ffffff; background-color:#003366; text-decoration: none; }
.navItemOver a:hover { color: #ffffff; background-color:#003366; text-decoration: none; }
.navItem { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #3c78b5; }
.navItem a { color: #ffffff; text-decoration: none; }
.navItem a:hover { color: #ffffff; text-decoration: none; }
.navItem a:visited { color: #ffffff; text-decoration: none; }

div.padded { padding: 4px; }
div.thickPadded { padding: 10px; }
h3.macrolibrariestitle {
    margin: 0px 0px 0px 0px;
}

div.centered { text-align: center; margin: 10px; }
div.centered table {margin: 0px auto; text-align: left; }

.tableview table {
    margin: 0;
}

.tableview th {
    text-align: left;
    color: #003366;
    font-size: 12px;
    padding: 5px 0px 0px 5px;
    border-bottom: 2px solid #3c78b5;
}
.tableview td {
    text-align: left;
    border-color: #ccc;
    border-width: 0px 0px 1px 0px;
    border-style: solid;
    margin: 0;
    padding: 4px 10px 4px 5px;
}

.grid {
    margin: 2px 0px 5px 0px;
    border-collapse: collapse;
}
.grid th  {
    border: 1px solid #ccc;
    padding: 2px 4px 2px 4px;
    background: #f0f0f0;
    text-align: center;
}
.grid td  {
    border: 1px solid #ccc;
    padding: 3px 4px 3px 4px;
}
.gridHover {
	background-color: #f9f9f9;
}

td.infocell {
    background-color: #f0f0f0;
}
.label {
	font-weight: bold;
	color: #003366;
}

label {
	font-weight: bold;
	color: #003366;
}

.error {
	background-color: #fcc;
}

.errorBox {
	background-color: #fcc;
    border: 1px solid #c00;
    padding: 5px;
    margin: 5px;
}

.errorMessage {
	color: #c00;
}

.success {
	background-color: #dfd;
}

.successBox {
	background-color: #dfd;
    border: 1px solid #090;
    padding: 5px;
    margin-top:5px;
    margin-bottom:5px;
}

blockquote {
	padding-left: 10px;
	padding-right: 10px;
	margin-left: 5px;
	margin-right: 0px;
	border-left: 1px solid #3c78b5;
}

table.confluenceTable
{
    margin: 5px;
    border-collapse: collapse;
}

/* Added as a temporary fix for CONF-4223. The table elements appear to be inheriting the border: none attribute from the sectionMacro class */
table.confluenceTable td.confluenceTd
{
    border-width: 1px;
    border-style: solid;
    border-color: #ccc;
    padding: 3px 4px 3px 4px;
}

/* Added as a temporary fix for CONF-4223. The table elements appear to be inheriting the border: none attribute from the sectionMacro class */
table.confluenceTable th.confluenceTh
{
    border-width: 1px;
    border-style: solid;
    border-color: #ccc;
    padding: 3px 4px 3px 4px;
    background-color: #f0f0f0;
    text-align: center;
}

td.confluenceTd
{
    border-width: 1px;
    border-style: solid;
    border-color: #ccc;
    padding: 3px 4px 3px 4px;
}

th.confluenceTh
{
    border-width: 1px;
    border-style: solid;
    border-color: #ccc;
    padding: 3px 4px 3px 4px;
    background-color: #f0f0f0;
    text-align: center;
}

DIV.small {
	font-size: 9px;
}

H1.pagename {
	margin-top: 0px;
}

IMG.inline  {}

.loginform {
    margin: 5px;
    border: 1px solid #ccc;
}

/* The text how the "This is a preview" comment should be shown. */
.previewnote { text-align: center;
                font-size: 11px;
                    color: red; }

/* How the preview content should be shown */
.previewcontent { background: #E0E0E0; }

/* How the system messages should be shown (DisplayMessage.jsp) */
.messagecontent { background: #E0E0E0; }

/* How the "This page has been modified..." -comment should be shown. */
.conflictnote { }

.createlink {
    color: maroon;
}
a.createlink {
    color: maroon;
}
.templateparameter {
    font-size: 9px;
    color: darkblue;
}

.diffadded {
    background: #ddffdd;
    padding: 1px 1px 1px 4px;
	border-left: 4px solid darkgreen;
}
.diffdeleted {
    color: #999;
    background: #ffdddd;
    padding: 1px 1px 1px 4px;
	border-left: 4px solid darkred;
}
.diffnochange {
    padding: 1px 1px 1px 4px;
	border-left: 4px solid lightgrey;
}
.differror {
    background: brown;
}
.diff {
    font-family: lucida console, courier new, fixed-width;
	font-size: 12px;
	line-height: 14px;
}
.diffaddedchars {
    background-color:#99ff99;
    font-weight:bolder;
}
.diffremovedchars {
    background-color:#ff9999;
    text-decoration: line-through;
    font-weight:bolder;
}

.greybackground {
    background: #f0f0f0
}

.greybox {
 	border: 1px solid #ddd;
	padding: 3px;
	margin: 1px 1px 10px 1px;
}

.borderedGreyBox {
    border: 1px solid #cccccc;
    background-color: #f0f0f0;
    padding: 10px;
}

.greyboxfilled {
 	border: 1px solid #ddd;
    background: #f0f0f0;
    padding: 3px;
	margin: 1px 1px 10px 1px;
}

.navBackgroundBox {
    padding: 5px 5px 5px 5px;
    font-size: 22px;
	font-weight: bold;
	font-family: Arial, sans-serif;
	color: white;
    background: #3c78b5;
    text-decoration: none;
}

.previewBoxTop {
	background-color: #f0f0f0;
    border-width: 1px 1px 0px 1px;
    border-style: solid;
    border-color: #3c78b5;
    padding: 5px;
    margin: 5px 0px 0px 0px;
    text-align: center;
}
.previewContent {
    background-color: #fff;
 	border-color: #3c78b5;
	border-width: 0px 1px 0px 1px;
	border-style: solid;
	padding: 10px;
	margin: 0px;
}
.previewBoxBottom {
	background-color: #f0f0f0;
    border-width: 0px 1px 1px 1px;
    border-style: solid;
    border-color: #3c78b5;
    padding: 5px;
    margin: 0px 0px 5px 0px;
    text-align: center;
}

.functionbox {
    background-color: #f0f0f0;
 	border: 1px solid #3c78b5;
	padding: 3px;
	margin: 1px 1px 10px 1px;
}

.functionbox-greyborder {
    background-color: #f0f0f0;
 	border: 1px solid #ddd;
	padding: 3px;
	margin: 1px 1px 10px 1px;
}

.search-highlight {
    background-color: #ffffcc;
}

/* normal (white) background */
.rowNormal {
    background-color: #ffffff;
 }

/* alternate (pale yellow) background */
.rowAlternate {
    background-color: #f7f7f7;
}

/* used in the list attachments table */
.rowAlternateNoBottomColor {
    background-color: #f7f7f7;
}

.rowAlternateNoBottomNoColor {
}

.rowAlternateNoBottomColor td {
    border-bottom: 0px;
}

.rowAlternateNoBottomNoColor td {
    border-bottom: 0px;
}

/* row highlight (grey) background */
.rowHighlight {
    background-color: #f0f0f0;

}

TD.greenbar {FONT-SIZE: 2px; BACKGROUND: #00df00; BORDER: 1px solid #9c9c9c; PADDING: 0px; }
TD.redbar {FONT-SIZE: 2px; BACKGROUND: #df0000; BORDER: 1px solid #9c9c9c; PADDING: 0px; }
TD.darkredbar {FONT-SIZE: 2px; BACKGROUND: #af0000; BORDER: 1px solid #9c9c9c; PADDING: 0px; }

TR.testpassed {FONT-SIZE: 2px; BACKGROUND: #ddffdd; PADDING: 0px; }
TR.testfailed {FONT-SIZE: 2px; BACKGROUND: #ffdddd; PADDING: 0px; }

.toolbar  {
    margin: 0px;
    border-collapse: collapse;
}

.toolbar td  {
    border: 1px solid #ccc;
    padding: 2px 2px 2px 2px;
    color: #ccc;
}

td.noformatting {
    border-width: 0px;
    border-style: none;
    text-align: center;
	padding: 0px;
}

.commentblock {
    margin: 12px 0 12px 0;
}

/*
 * Divs displaying the license information, if necessary.
 */
.license-eval, .license-none, .license-nonprofit {
    border-top: 1px solid #bbbbbb;
    text-align: center;
    font-size: 10px;
    font-family: Verdana, Arial, Helvetica, sans-serif;
}

.license-eval, .license-none {
    background-color: #ffcccc;
}

.license-eval b, .license-none b {
    color: #990000
}

.license-nonprofit {
    background-color: #ffffff;
}

/*
 * The shadow at the bottom of the page between the main content and the
 * "powered by" section.
 */
.bottomshadow {
    height: 12px;
    background-image: url("$req.contextPath/images/border/border_bottom.gif");
    background-repeat: repeat-x;
}

/*
 * Styling of the operations box
 */
.navmenu .operations li, .navmenu .operations ul {
    list-style: none;
    margin-left: 0;
    padding-left: 0;
}

.navmenu .operations ul {
    margin-bottom: 9px;
}

.navmenu .label {
    font-weight: inherit;
}

/*
 * Styling of ops as a toolbar
 */
.toolbar div {
    display: none;
}

.toolbar .label {
    display: none;
}

.toolbar .operations {
    display: block;
}

.toolbar .operations ul {
    display: inline;
    list-style: none;
    margin-left: 10px;
    padding-left: 0;
}

.toolbar .operations li {
    list-style: none;
    display: inline;
}

/* list page navigational tabs */
#foldertab {
padding: 3px 0px 3px 8px;
margin-left: 0;
border-bottom: 1px solid #3c78b5;
font: bold 11px Verdana, sans-serif;
}

#foldertab li {
list-style: none;
margin: 0;
display: inline;
}

#foldertab li a {
padding: 3px 0.5em;
margin-left: 3px;
border: 1px solid #3c78b5;
border-bottom: none;
background: #3c78b5;
text-decoration: none;
}

#foldertab li a:link { color: #ffffff; }
#foldertab li a:visited { color: #ffffff; }

#foldertab li a:hover {
color: #ffffff;
background: #003366;
border-color: #003366;
}

#foldertab li a.current {
background: white;
border-bottom: 1px solid white;
color: black;
}

#foldertab li a.current:link { color: black; }
#foldertab li a.current:visited { color: black; }
#foldertab li a.current:hover {
background: white;
border-bottom: 1px solid white;
color: black;
}

/* alphabet list */
ul#squaretab {
margin-left: 0;
padding-left: 0;
white-space: nowrap;
font: bold 8px Verdana, sans-serif;
}

#squaretab li {
display: inline;
list-style-type: none;
}

#squaretab a {
padding: 2px 6px;
border: 1px solid #3c78b5;
}

#squaretab a:link, #squaretab a:visited {
color: #fff;
background-color: #3c78b5;
text-decoration: none;
}

#squaretab a:hover {
color: #ffffff;
background-color: #003366;
border-color: #003366;
text-decoration: none;
}

#squaretab li a#current {
background: white;
color: black;
}

.blogcalendar * {
    font-family:verdana, arial, sans-serif;
    font-size:x-small;
    font-weight:normal;
    line-height:140%;
    padding:2px;
}


table.blogcalendar {
    border: 1px solid #3c78b5;
}

.blogcalendar th.calendarhead, a.calendarhead {
    font-size:x-small;
    font-weight:bold;
    padding:2px;
    text-transform:uppercase;
    background-color: #3c78b5;
    color: #ffffff;
    letter-spacing: .3em;
    text-transform: uppercase;
}

.calendarhead:visited {color: white;}
.calendarhead:active {color: white;}
.calendarhead:hover {color: white;}

.blogcalendar th {
    font-size:x-small;
    font-weight:bold;
    padding:2px;
    background-color:#f0f0f0;
}

.blogcalendar td {
    font-size:x-small;
    font-weight:normal;
}

.searchGroup { padding: 0 0 10px 0; background: #f0f0f0; }
.searchGroupHeading { font-size: 10px; font-weight: bold; color: #ffffff; background-color: #3c78b5; padding: 2px 4px 1px 4px; }
.searchItem { padding: 1px 4px 1px 4px; }
.searchItemSelected { padding: 1px 4px 1px 4px; font-weight: bold; background: #ddd; }

/* permissions page styles */
.permissionHeading {
    border-bottom: #bbb; border-width: 0 0 1px 0; border-style: solid; font-size: 16px; text-align: left;
}
.permissionTab {
    border-width: 0 0 0 1px; border-style: solid; background: #3c78b5; color: #ffffff; font-size: 10px;
}
.permissionSuperTab {
    border-width: 0 0 0 1px; border-style: solid; background: #003366; color: #ffffff;
}
.permissionCell {
    border-left: #bbb; border-width: 0 0 0 1px; border-style: solid;
}

/* warning panel */
.warningPanel { background: #FFFFCE; border:#F0C000 1px solid; padding: 8px; margin: 10px; }
/* alert panel */
.alertPanel { background: #FFCCCC; border:#C00 1px solid; padding: 8px; margin: 10px; }
/* info panel */
.infoPanel { background: #D8E4F1; border:#3c78b5 1px solid; padding: 8px; margin: 10px; }

/* side menu highlighting (e.g. space content screen) */
.optionPadded { padding: 2px; }
.optionSelected { background-color: #ffffcc; padding: 2px; border: 1px solid #ddd; margin: -1px; }
.optionSelected a { font-weight: bold; text-decoration: none; color: black; }

/* information macros */
.noteMacro { border-style: solid; border-width: 1px; border-color: #F0C000; background-color: #FFFFCE; text-align:left; margin-top: 5px; margin-bottom: 5px}
.warningMacro { border-style: solid; border-width: 1px; border-color: #c00; background-color: #fcc; text-align:left; margin-top: 5px; margin-bottom: 5px}
.infoMacro { border-style: solid; border-width: 1px; border-color: #3c78b5; background-color: #D8E4F1; text-align:left; margin-top: 5px; margin-bottom: 5px}
.tipMacro { border-style: solid; border-width: 1px; border-color: #090; background-color: #dfd; text-align:left; margin-top: 5px; margin-bottom: 5px}
.informationMacroPadding { padding: 5px 0 0 5px; }

table.infoMacro td, table.warningMacro td, table.tipMacro td, table.noteMacro td, table.sectionMacro td {
    border: none;
}

table.sectionMacroWithBorder td.columnMacro { border-style: dashed; border-width: 1px; border-color: #cccccc;}

.pagecontent
{
    padding: 10px;
    text-align: left;
}

/* styles for links in the top bar */
.topBarDiv a:link {color: #ffffff;}
.topBarDiv a:visited {color: #ffffff;}
.topBarDiv a:active {color: #ffffff;}
.topBarDiv a:hover {color: #ffffff;}
.topBarDiv {color: #ffffff;}

.topBar {
    background-color: #003366;
}


/* styles for extended operations */
.greyLinks a:link {color: #666666; text-decoration:underline;}
.greyLinks a:visited {color: #666666; text-decoration:underline;}
.greyLinks a:active {color: #666666; text-decoration:underline;}
.greyLinks a:hover {color: #666666; text-decoration:underline;}
.greyLinks {color: #666666; display:block; padding: 10px}

.logoSpaceLink {color: #999999; text-decoration: none}
.logoSpaceLink a:link {color: #999999; text-decoration: none}
.logoSpaceLink a:visited {color: #999999; text-decoration: none}
.logoSpaceLink a:active {color: #999999; text-decoration: none}
.logoSpaceLink a:hover {color: #003366; text-decoration: none}

/* basic panel (basicpanel.vmd) style */
.basicPanelContainer {border: 1px solid #3c78b5; margin-top: 2px; margin-bottom: 8px; width: 100%}
.basicPanelTitle {padding: 5px; margin: 0px; background-color: #f0f0f0; color: black; font-weight: bold;}
.basicPanelBody {padding: 5px; margin: 0px}

.separatorLinks a:link {color: white}
.separatorLinks a:visited {color: white}
.separatorLinks a:active {color: white}

.greynavbar {background-color: #f0f0f0; border-top: 1px solid #3c78b5; margin-top: 2px}

div.headerField {
    float: left;
    width: auto;
    height: 100%;
}

.headerFloat {
    margin-left: auto;
    width: 50%;
}

.headerFloatLeft {
    float: left;
    margin-right: 20px;
    margin-bottom: 10px;
}

#headerRow {
    padding: 10px;
}

div.license-personal {
   background-color: #003366;
   color: #ffffff;
}

div.license-personal a {
   color: #ffffff;
}

.greyFormBox {
    border: 1px solid #cccccc;
    padding: 5px;
}

/* IE automatically adds a margin before and after form tags. Use this style to remove that */
.marginlessForm {
    margin: 0px;
}

.openPageHighlight {
    background-color: #ffffcc;
    padding: 2px;
    border: 1px solid #ddd;
}

.editPageInsertLinks, .editPageInsertLinks a
{
    color: #666666;
    font-weight: bold;
    font-size: 10px;
}

/* Style for label heatmap. */
.top10 a {
    font-weight: bold;
    font-size: 2em;
    color: #003366;
}
.top25 a {
    font-weight: bold;
    font-size: 1.6em;
    color: #003366;
}
.top50 a {
    font-size: 1.4em;
    color: #003366;
}
.top100 a {
    font-size: 1.2em;
    color: #003366;
}

.heatmap {
    list-style:none;
    width: 95%;
    margin: 0px auto;
}

.heatmap a {
    text-decoration:none;
}

.heatmap a:hover {
    text-decoration:underline;
}

.heatmap li {
    display: inline;
}

.minitab {
padding: 3px 0px 3px 8px;
margin-left: 0;
margin-top: 1px;
margin-bottom: 0px;
border-bottom: 1px solid #3c78b5;
font: bold 9px Verdana, sans-serif;
text-decoration: none;
float:none;
}
.selectedminitab {
padding: 3px 0.5em;
margin-left: 3px;
margin-top: 1px;
border: 1px solid #3c78b5;
background: white;
border-bottom: 1px solid white;
color: #000000;
text-decoration: none;
}
.unselectedminitab {
padding: 3px 0.5em;
margin-left: 3px;
margin-top: 1px;
border: 1px solid #3c78b5;
border-bottom: none;
background: #3c78b5;
color: #ffffff;
text-decoration: none;
}

a.unselectedminitab:hover {
color: #ffffff;
background: #003366;
border-color: #003366;
}

a.unselectedminitab:link { color: white; }
a.unselectedminitab:visited { color: white; }

a.selectedminitab:link { color: black; }
a.selectedminitab:visited { color: black; }

.linkerror { background-color: #fcc;}

a.labelOperationLink:link {text-decoration: underline}
a.labelOperationLink:active {text-decoration: underline}
a.labelOperationLink:visited {text-decoration: underline}
a.labelOperationLink:hover {text-decoration: underline}

a.newLabel:link {background-color: #ddffdd}
a.newLabel:active {background-color: #ddffdd}
a.newLabel:visited {background-color: #ddffdd}
a.newLabel:hover {background-color: #ddffdd}

ul.square {list-style-type: square}

.inline-control-link {
    background: #ffc;
    font-size: 9px;
    color: #666;
    padding: 2px;
    text-transform: uppercase;
    text-decoration: none;
}


.inline-control-link a:link {text-decoration: none}
.inline-control-link a:active {text-decoration: none}
.inline-control-link a:visited {text-decoration: none}
.inline-control-link a:hover {text-decoration: none}

.inline-control-link {
    background: #ffc;
    font-size: 9px;
    color: #666;
    padding: 2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

div.auto_complete {
    width: 350px;
    background: #fff;
}
div.auto_complete ul {
    border: 1px solid #888;
    margin: 0;
    padding: 0;
    width: 100%;
    list-style-type: none;
}
div.auto_complete ul li {
    margin: 0;
    padding: 3px;
}
div.auto_complete ul li.selected {
    background-color: #ffb;
}
div.auto_complete ul strong.highlight {
    color: #800;
    margin: 0;
    padding: 0;
}

/******* Edit Page Styles *******/
.toogleFormDiv{
    border:1px solid #A7A6AA;
    background-color:white;
    padding:5px;
    margin-top: 5px;
}

.toogleInfoDiv{
    border:1px solid #A7A6AA;
    background-color:white;
    display:none;
    padding:5px;
    margin-top: 10px;
}

.inputSection{
    margin-bottom:20px;
}

#editBox{
   border:1px solid lightgray;
   background-color:#F0F0F0;
}

/******* Left Navigation Theme Styles ********/
.leftnav li a {
    text-decoration:none;
    color:white;
    margin:0px;
    display:block;
    padding:2px;
    padding-left:5px;
    background-color: #3c78b5;
    border-top:1px solid #3c78b5;
}

.leftnav li a:active {color:white;}
.leftnav li a:visited {color:white;}
.leftnav li a:hover {background-color: #003366; color:white;}

/* Added by Shaun during i18n */
.replaced
{
    background-color: #33CC66;
}

.topPadding
{
    margin-top: 20px;
}

/* new form style */
.form-block {
    padding: 6px;
}
.form-error-block {
    padding: 6px;
    background: #fcc;
    border-top: #f0f0f0 1px solid;
    border-bottom: #f0f0f0 1px solid;
    margin-bottom: 6px;
    padding: 0 12px 0 12px;
}
.form-element-large {
    font-size: 16px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: #003366;
}

.form-element-small {
    font-size: 12px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    color: #003366;
}

.form-header {
    background: lightyellow;
    border-top: #f0f0f0 1px solid;
    border-bottom: #f0f0f0 1px solid;
    margin-bottom: 6px;
    padding: 0 12px 0 12px;
}
.form-header p, .form-block p, .form-error-block p {
    line-height: normal;
    margin: 12px 0 12px 0;
}
.form-example {
    color: #888;
    font-size: 11px;
}
.form-divider {
    border-bottom: #ccc 1px solid;
    margin-bottom: 6px;
}
.form-buttons {
    margin-top: 6px;
    border-top: #ccc 1px solid;
    border-bottom: #ccc 1px solid;
    background: #f0f0f0;
    padding: 10px;
    text-align: center;
}
.form-buttons input {
    width: 100px;
}
.form-block .error {
    padding: 6px;
    margin-bottom: 6px;
}
    -->
    </style>
</head>
<body>

<div id="PageContent">
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%"><tr>
<td valign="top" class="pagebody">

    <div class="pageheader">
        <span class="pagetitle">
            Page Edited :
            <a href="http://cwiki.apache.org/confluence/display/SM">SM</a> :
            <a href="http://cwiki.apache.org/confluence/display/SM/Hello+World+-+BC">Hello World - BC</a>
        </span>
    </div>

     <p>
        <a href="http://cwiki.apache.org/confluence/display/SM/Hello+World+-+BC">Hello World - BC</a>
        has been edited by             <a href="http://cwiki.apache.org/confluence/display/~lars.heinemann@compart.net">Lars Heinemann</a>
            <span class="smallfont">(Apr 04, 2008)</span>.
     </p>
    
     <p>
                 <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=38886&originalVersion=22&revisedVersion=23">(View changes)</a>
     </p>

    <span class="label">Content:</span><br/>
    <div class="greybox wiki-content"><h1><a name="HelloWorld-BC-CreatingaHelloWorldJBIBindingComponent"></a>Creating a Hello World JBI Binding Component</h1>

<table cellpadding='5' width='85%' cellspacing='8px' class='warningMacro' border="0" align='center'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/confluence/images/icons/emoticons/forbidden.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">ATTENTION!</b><br />
<p><br clear="all" />
<b>This tutorial page is a work in progress and it may contain outdated information or may not work at all. It will be reworked soon, so check back later for updates.</b>
<br clear="all" />
<br clear="all" />
<br clear="all" /></p></td></tr></table>
<p><br clear="all" />
<br clear="all" /></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="/confluence/images/icons/emoticons/check.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Should I Create My Own JBI Components?</b><br />
<p><b>NOTE:</b> Before beginning this tutorial, please take the time to read the FAQ entry titled <a href="/confluence/pages/viewpage.action?pageId=54624" title="Should I Create My Own JBI Components?">Should I Create My Own JBI Components&#63;</a>. It is very important that you understand the reason for developing a JBI binding component and this FAQ entry will explain this. </p></td></tr></table>

<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="HelloWorld-BC-Prerequisites"></a>Prerequisites</h2>

<ul>
	<li>Maven 2.0.7 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="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> explains some valuable concepts surrounding Maven</li>
	</ul>
	</li>
	<li>ServiceMix 3.2.1 or higher</li>
	<li>A broadband internet connection so Maven can automatically download dependencies</li>
</ul>


<h2><a name="HelloWorld-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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/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="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></li>
	<li>The <a href="/confluence/display/SM/5.+JBI" title="5. JBI">JBI</a> section of the <a href="/confluence/display/SM/User%27s+Guide" title="User's Guide">User'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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> JavaWorld article</li>
</ul>


<p>Now let's move on to creating the Maven projects for the Hello World binding component. </p>

<h2><a name="HelloWorld-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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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 are 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-binding-component<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" 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.2.1 \<br/>
    -DgroupId=org.apache.servicemix.samples.helloworld.bc \<br/>
    -DartifactId=hello-world-bc </p>
</div></div>

<p>The command above will create a directory named <tt>hello-world-bc</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.2.1) 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) 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="/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.2.1) 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://svn.apache.org/viewvc/incubator/servicemix/trunk/pom.xml?view=markup" title="Visit page outside Confluence" rel="nofollow">in the top level ServiceMix POM<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" 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] Searching repository for plugin with prefix: 'archetype'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:create] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =&gt; 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on =&gt; 'false'.
[INFO] Setting property: resource.loader =&gt; 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound =&gt; 'false'.
[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 'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: 
Unable to find resource 'VM_global_library.vm'
[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.2.1
[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
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 85,column 16] : 
${servicemix-version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 90,column 16] : 
${servicemix-version} is not a valid reference.
[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 115,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
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Tue Mar 06 18:27:08 MST 2007
[INFO] Final Memory: 4M/8M
[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="/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-bc</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">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span>?&gt;
&lt;project xmlns=<span class="code-quote">"http:<span class="code-comment">//maven.apache.org/POM/4.0.0"</span> 
</span>    xmlns:xsi=<span class="code-quote">"http:<span class="code-comment">//www.w3.org/2001/XMLSchema-instance"</span>
</span>    xsi:schemaLocation=<span class="code-quote">"http:<span class="code-comment">//maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"</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-bc&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="HelloWorld-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
$ 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.bc.MyComponent
Checking: org.apache.servicemix.samples.helloworld.bc.MyConsumerEndpoint
Checking: org.apache.servicemix.samples.helloworld.bc.MyProviderEndpoint
[INFO] Generating META-INF properties file: 
/Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/META-INF/services/org/apache/xbean/spring/http/
org.apache.servicemix.samples.helloworld.bc/1.0 for namespace: http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating Spring 2.0 handler mapping: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/META-INF/spring.handlers for namespace: 
http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating Spring 2.0 schema mapping: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/META-INF/spring.schemas for namespace: 
http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating HTML documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd.html for namespace: 
http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating XSD file: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd for namespace: 
http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating WIKI documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd.wiki for namespace: 
\http://org.apache.servicemix.samples.helloworld.bc/1.0
Warning, could not load class: org.apache.servicemix.samples.helloworld.bc.MyEndpointType: java.lang.ClassNotFoundException: 
org.apache.servicemix.samples.helloworld.bc.MyEndpointType
[INFO] ...done.
[INFO] [jbi:generate-jbi-component-descriptor]
[INFO] Generating jbi.xml
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 5 source files to /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.servicemix.samples.helloworld.bc.MySpringComponentTest
log4j:WARN No appenders could be found for logger (org.springframework.core.CollectionFactory).
log4j:WARN Please initialize the log4j system properly.
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.431 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-bc/target/hello-world-bc-1.0-SNAPSHOT.jar
[INFO] [jbi:jbi-component]
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[INFO] Generating installer /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/hello-world-bc-1.0-SNAPSHOT-installer.zip
[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/hello-world-bc-1.0-SNAPSHOT-installer.zip
[INFO] [install:install]
[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/hello-world-bc-1.0-SNAPSHOT.jar to 
/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/bc/hello-world-bc/1.0-SNAPSHOT/hello-world-bc-1.0-SNAPSHOT.jar
[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd to 
/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/bc/hello-world-bc/1.0-SNAPSHOT/hello-world-bc-1.0-SNAPSHOT.xsd
[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd.html to 
/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/bc/hello-world-bc/1.0-SNAPSHOT/hello-world-bc-1.0-SNAPSHOT-schema.html
[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/hello-world-bc-1.0-SNAPSHOT-installer.zip to 
/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/bc/hello-world-bc/1.0-SNAPSHOT/hello-world-bc-1.0-SNAPSHOT-installer.zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Tue Mar 06 18:29:51 MST 2007
[INFO] Final Memory: 13M/28M
[INFO] ------------------------------------------------------------------------
</pre>
</div></div>

<p>Your output may look slightly different because Maven will download the required artifacts. 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="HelloWorld-BC-CreatingtheJBIComponent"></a>Creating the JBI Component </h2>

<p>Before we create any custom functionality, let's first examine some of the items generated by the servicemix-binding-component Maven archetype in this simple component we'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="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> or from the <span class="nobr"><a href="http://svn.apache.org/viewvc/incubator/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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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>src/main/java/org/apache/servicemix/samples/bc/MyBootstrap.java</tt> - <del>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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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.</del> This class is no longer needed.</li>
</ul>


<ul>
	<li><tt>src/main/java/org/apache/servicemix/samples/bc/MyComponent.java</tt> - Extends the <span class="nobr"><a href="http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/DefaultComponent.java?view=markup" title="Visit page outside Confluence" rel="nofollow"><tt>DefaultComponent</tt><sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span>, a convenience class that makes creating JBI components much easier and provides some additional lifecycle management for the BC when it's 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>src/main/java/org/apache/servicemix/samples/bc/MyConsumerEndpoint.java</tt> - Extends <span class="nobr"><a href="http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ConsumerEndpoint.java?view=markup" title="Visit page outside Confluence" rel="nofollow"><tt>ConsumerEndpoint</tt><sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> and implements <tt>MyEndpointType</tt>. If you'd like to create a BC that fulfills the consumer role, implement the <tt>process()</tt> method in this class.</li>
</ul>


<ul>
	<li><tt>src/main/java/org/apache/servicemix/samples/bc/MyEndpointType.java</tt> - This class is simply an interface marker for <span class="nobr"><a href="http://geronimo.apache.org/xbean" title="Visit page outside Confluence" rel="nofollow">Apache XBean<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> so it can generate an XML schema document.</li>
</ul>


<ul>
	<li><tt>src/main/java/org/apache/servicemix/samples/bc/MyProviderEndpoint.java</tt> - Extends <span class="nobr"><a href="http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-common/src/main/java/org/apache/servicemix/common/endpoints/ProviderEndpoint.java?view=log" title="Visit page outside Confluence" rel="nofollow"><tt>ProviderEndpoint</tt><sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> and implements <tt>MyEndpointType</tt>. If you'd like to create a BC that fulfills the provider role, depending on the MEP being supported, you will need to implement the <tt>processInOnly()</tt> method or the <tt>processInOut()</tt> method in this class.</li>
</ul>


<ul>
	<li><tt>src/main/java/org/apache/servicemix/samples/bc/MyEndpointType.java</tt> - This is a marker interface used by XBean so it can generate a XML schema.</li>
</ul>


<ul>
	<li><tt>src/test/java/org/apache/servicemix/samples/bc/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> - A very simple and generic ServiceMix configuration file for use with the <tt>MySpringComponentTest</tt>.</li>
</ul>


<p>Now that we've gotten a bird's eye view of what we're working with, let's proceed to adding the custom functionality. </p>

<h3><a name="HelloWorld-BC-AddingCustomFunctionality"></a>Adding Custom Functionality </h3>

<p>Before creating custom functionality for the BC, you need to understand the role of a JBI BC. A BC is simply a binding to a service that is external to the JBI normalized message router (NMR) using some type of communications protocol (e.g., FTP, HTTP, JMS, etc.). It's also the responsibility of the BC to handle any conversion of the message format into a <span class="nobr"><a href="http://servicemix.org/site/5-jbi.html#5.JBI-Normalizedmessage" title="Visit page outside Confluence" rel="nofollow">normalized message<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> so that can be sent along to the NMR. This is known as message normalization. </p>

<p>Just as an example, if we were to create a BC that uses <span class="nobr"><a href="http://www.protocols.com/pbook/tcpip9.htm#SNMP" title="Visit page outside Confluence" rel="nofollow">SNMP<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> as the application layer protocol, the SNMP RFC specifies the message format to be used with particular versions of SNMP. It would be the responsibility of the BC to handle not only the communication via the SNMP protocol but also to handling the marshalling of SNMP messages to/from JBI normalized messages. The BC would simply be a binding to a service external to the NMR that speaks SNMP messages via the SNMP protocol. </p>

<p>More on this later in the tutorial. For now, let's proceed with the custom functionality. </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="/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 easily generate project files for Eclipse or 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 from the command line and then import the project into your Eclipse IDE. </p></td></tr></table>

<p>The creation of a binding component is dependent upon the role that it will play. BCs are consumers, providers or both. Below are definitions of the two roles as they pertain to BCs: </p>

<ul>
	<li><b>Consumer</b> - A consumer BC receives requests from a service external to the JBI container and publishes those requests to the NMR.</li>
	<li><b>Provider</b> - A provider BC receives requests from the NMR and publishes those requests to a service that is external to the JBI container.</li>
</ul>


<p>This is why both the <tt>MyConsumerEndpoint.java</tt> and the <tt>MyProviderEndpoint.java</tt> files exist when using the servicemix-binding-component archetype to create a Maven project. This way the BC that you're creating can play either the consumer role or the provider role or both. For the sake of this tutorial, we will implement the provider role. Let's proceed to implement the provider functionality. To do so, open <tt>MyProviderEndpoint.java</tt> and let's take a look at he <tt>processInOut()</tt> method as shown below: </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 {
    <span class="code-keyword">throw</span> <span class="code-keyword">new</span> UnsupportedOperationException(<span class="code-quote">"Unsupported MEP: "</span> + exchange.getPattern());
}</pre>
</div></div>

<p>One important item of note before we get started is that this tutorial will not actually be accessing any services external to the JBI container. The reason for this is that setting up a service external to the JBI container would dramatically increase the complexity of this tutorial. Instead, we will just simulate such functionality by hard-coding some text to be returned. </p>

<p>The <tt>processInOut()</tt> method is just a stub that needs to be populated with our custom functionality. Below is the method body that can be copied and pasted into the method stub add some custom functionality. Following the display of this method, we will pick apart this method a bit to explain the various pieces of logic: </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 {
	<span class="code-comment">// Grab the in message 
</span>	SourceTransformer sourceTransformer = <span class="code-keyword">new</span> SourceTransformer();
	DOMSource inMessageXml = (DOMSource) sourceTransformer.toDOMSource(in); 
	
	<span class="code-comment">// Parse out the actual message content 
</span>	CachedXPathAPI xpath = <span class="code-keyword">new</span> CachedXPathAPI();
	Node inMessageNode = xpath.selectSingleNode(inMessageXml.getNode(), <span class="code-quote">"/hello"</span>);
	<span class="code-object">String</span> inMessage = inMessageNode.getTextContent(); 
	
	<span class="code-comment">// Create the out message and set it 
</span>	<span class="code-object">String</span> outMessage = <span class="code-quote">"&lt;hello&gt;Message ["</span> + inMessage + <span class="code-quote">"] contains ["</span> + inMessage.getBytes().length + <span class="code-quote">"] bytes&lt;/hello&gt;"</span>;
	out.setContent(<span class="code-keyword">new</span> StringSource(outMessage));
}</pre>
</div></div>

<p>Adding this method will require the import of the following classes: </p>

<ul>
	<li><tt>javax.xml.transform.dom.DOMSource</tt></li>
	<li><tt>org.apache.servicemix.jbi.jaxp.SourceTransformer</tt></li>
	<li><tt>org.apache.servicemix.jbi.jaxp.StringSource</tt></li>
	<li><tt>org.apache.xpath.CachedXPathAPI</tt></li>
	<li><tt>org.w3c.dom.Node</tt></li>
</ul>


<p>All of these classes can be found in either the <span class="nobr"><a href="http://svn.apache.org/viewvc/incubator/servicemix/trunk/core/servicemix-core/" title="Visit page outside Confluence" rel="nofollow">servicemix-core<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span> project or its transitive dependencies. If you're using Eclipse, you can tell Eclipse to automatically import them by selecting Source-&gt;Organize Imports. </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="/confluence/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b class="strong">Important Information!</b><br />
<p>This tutorial will not be accessing any services external to the JBI container. Instead, we will just simulate such functionality by hard-coding some text to be returned. </p></td></tr></table>

<p>Now let's move on to testing this component and then we'll compile and test it. </p>

<h2><a name="HelloWorld-BC-TestingtheHelloWorldBindingComponent"></a>Testing the Hello World Binding Component</h2>

<p>Thanks to the Maven archetype, testing the component is very easy because it already created a test. The only change we'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.bc.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">"&lt;hello&gt;world&lt;/hello&gt;"</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">"&lt;hello&gt;Ski Colorado!&lt;/hello&gt;"</span>));</pre>
</div></div>

<p>Also, add the following block of code to line # 40 below the comment: </p>

<div class="code"><div class="codeContent">
<pre class="code-java"><span class="code-keyword">if</span> (me.getStatus() == ExchangeStatus.ERROR) {
    <span class="code-keyword">if</span> (me.getError() != <span class="code-keyword">null</span>) { 
        <span class="code-keyword">throw</span> me.getError();
    } <span class="code-keyword">else</span> {
        fail(<span class="code-quote">"Received ERROR status"</span>);
    }       
} <span class="code-keyword">else</span> <span class="code-keyword">if</span> (me.getFault() != <span class="code-keyword">null</span>) { 
    fail(<span class="code-quote">"Received fault: "</span> + <span class="code-keyword">new</span> SourceTransformer().toString(me.getFault().getContent()));
}
<span class="code-object">System</span>.err.println(<span class="code-keyword">new</span> SourceTransformer().toString(me.getOutMessage().getContent()));
client.done(me);</pre>
</div></div>

<p>Though there are no asserts in the test, it is more about seeing visual confirmation of the message being output to the console when running the test. So to compile the source and to execute the test, simply run the Maven <tt>install</tt> goal on the command line from within the <tt>hello-world-bc</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.bc.MyComponent
Checking: org.apache.servicemix.samples.helloworld.bc.MyConsumerEndpoint
Checking: org.apache.servicemix.samples.helloworld.bc.MyProviderEndpoint
[INFO] Generating META-INF properties file: 
/Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/META-INF/services/org/apache/xbean/spring/http/org.apache.servicemix.samples.helloworld.bc/1.0 
for namespace: http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating Spring 2.0 handler mapping: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/META-INF/spring.handlers 
for namespace: http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating Spring 2.0 schema mapping: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/META-INF/spring.schemas 
for namespace: http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating HTML documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd.html 
for namespace: http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating XSD file: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd 
for namespace: http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] Generating WIKI documentation file: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd.wiki 
for namespace: http://org.apache.servicemix.samples.helloworld.bc/1.0
[INFO] ...done.
[INFO] [jbi:generate-jbi-component-descriptor]
[INFO] Generating jbi.xml
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[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-bc/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.apache.servicemix.samples.helloworld.bc.MySpringComponentTest
log4j:WARN No appenders could be found for logger (org.springframework.core.CollectionFactory).
log4j:WARN Please initialize the log4j system properly.
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;hello&gt;Message [Ski Colorado!] contains [13] bytes&lt;/hello&gt;
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.635 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-bc/target/hello-world-bc-1.0-SNAPSHOT.jar
[INFO] [jbi:jbi-component]
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[WARNING] Attempting to build MavenProject instance for Artifact of type: jar; constructing POM artifact instead.
[INFO] Generating installer /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/hello-world-bc-1.0-SNAPSHOT-installer.zip
[INFO] Building jar: /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/hello-world-bc-1.0-SNAPSHOT-installer.zip
[INFO] [install:install]
[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/hello-world-bc-1.0-SNAPSHOT.jar to 
/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/bc/hello-world-bc/1.0-SNAPSHOT/hello-world-bc-1.0-SNAPSHOT.jar
[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd to 
/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/bc/hello-world-bc/1.0-SNAPSHOT/hello-world-bc-1.0-SNAPSHOT.xsd
[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/xbean/hello-world-bc.xsd.html to 
/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/bc/hello-world-bc/1.0-SNAPSHOT/hello-world-bc-1.0-SNAPSHOT-schema.html
[INFO] Installing /Users/bsnyder/src/hello-world-smx/hello-world-bc/target/hello-world-bc-1.0-SNAPSHOT-installer.zip to 
/Users/bsnyder/.m2/repository/org/apache/servicemix/samples/helloworld/bc/hello-world-bc/1.0-SNAPSHOT/hello-world-bc-1.0-SNAPSHOT-installer.zip
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15 seconds
[INFO] Finished at: Tue Mar 06 19:59:50 MST 2007
[INFO] Final Memory: 13M/25M
[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: </p>

<p><b>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;hello&gt;Message [Ski Colorado!] contains [13] bytes&lt;/hello&gt;</b> </p>

<p>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 your first JBI BC successfully. </p>

<p>Now let's look at how this component is deployed to ServiceMix. </p>

<h2><a name="HelloWorld-BC-DeployingtheBCtoServiceMix"></a>Deploying the BC to ServiceMix </h2>

<p>Thanks to Maven, this BC has already been packaged properly to be deployed to ServiceMix. Just take a look in the target directory of the project and you will see the zip file: </p>

<div class="panel"><div class="panelContent">
<p>$ ls -l ./target | awk {'print $9'} </p>

<p>classes<br/>
hello-world-bc-1.0-SNAPSHOT-installer<br/>
hello-world-bc-1.0-SNAPSHOT-installer.zip<br/>
hello-world-bc-1.0-SNAPSHOT.jar<br/>
jbi.xml<br/>
surefire-reports<br/>
test-classes<br/>
xbean</p>
</div></div>

<p>This zip file contains everything needed to deploy the BC to ServiceMix. This can be done by simply copying the zip file to the ServiceMix component installation directory. By default, this is a directory named <em>install</em>. However, this does not complete the deployment of the BC. </p>

<p>In order to actually make use of the BC, you will need to create a JBI service unit (SU) that uses the BC. A SU is really just a configuration for a JBI component to tell it how to behave. Just like all the JBI components that come with ServiceMix, in order to use one, you will need to create a SU that configures it, telling the JBI container how the component should behave. But the situation with this component is a bit different. Because the Hello World BC contains a hard-coded message, there's not much configuration to be done other than just stating that it should be used. So let's create the SU for the Hello World BC and then we'll move on to testing it. </p>

<h2><a name="HelloWorld-BC-CreatingaHelloWorldBCServiceUnit"></a>Creating a Hello World BC Service Unit </h2>

<p><em>This is a work in progress</em> </p>

<h2><a name="HelloWorld-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'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-bc
$ cd .. 
$ mvn archetype:create \
    -DarchetypeGroupId=org.apache.servicemix.tooling \
    -DarchetypeArtifactId=servicemix-service-assembly \
    -DarchetypeVersion=3.2.1 \
    -DgroupId=org.apache.servicemix.samples.helloworld \
    -DartifactId=hello-world-sa</pre>
</div></div>

<p>Upon successful execution of the <tt>archetype:create</tt> goal, 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: 'archetype'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [archetype:create] (aggregator-style)
[INFO] ----------------------------------------------------------------------------
[INFO] Setting property: classpath.resource.loader.class =&gt; 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
[INFO] Setting property: velocimacro.messages.on =&gt; 'false'.
[INFO] Setting property: resource.loader =&gt; 'classpath'.
[INFO] Setting property: resource.manager.logwhenfound =&gt; 'false'.
[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 'VM_global_library.vm' in any resource loader.
[INFO] Velocimacro : error using  VM library template VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundException: 
Unable to find resource 'VM_global_library.vm'
[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.2.1
[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-bc</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'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="/confluence/display/SM/Mailing+Lists" 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-bc</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.bc&lt;/groupId&gt;
  &lt;artifactId&gt;hello-world-bc&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>
</pre>
</div></div>

<h2><a name="HelloWorld-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-smx</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">"1.0"</span> encoding=<span class="code-quote">"UTF-8"</span>?&gt;
&lt;project xmlns=<span class="code-quote">"http:<span class="code-comment">//maven.apache.org/POM/4.0.0"</span> 
</span>    xmlns:xsi=<span class="code-quote">"http:<span class="code-comment">//www.w3.org/2001/XMLSchema-instance"</span>
</span>    xsi:schemaLocation=<span class="code-quote">"http:<span class="code-comment">//maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"</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-bc&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-bc 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>
</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="HelloWorld-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's give each project a unique name via each component's <tt>pom.xml</tt> file. This name will allow Maven's output to denote a component'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'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-bc/pom.xml</tt> and replace <tt>&lt;name&gt;A custom project&lt;/name&gt;</tt> with <tt>&lt;name&gt;Hello World BC 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'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="HelloWorld-BC-DeployingtheComponent"></a>Deploying the Component </h3>

<p>Now that the SA is built, we'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="/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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/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.) <br/>
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 / "how to continue when having the working example"</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="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></p>

<p>manually editing <span class="nobr"><a href="http://goopen.org/confluence/display/SM/Working+with+Service+Units" title="Visit page outside Confluence" rel="nofollow">http://goopen.org/confluence/display/SM/Working+with+Service+Units<sup><img class="rendericon" src="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" 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="/confluence/images/icons/linkext7.gif" height="7" width="7" align="absmiddle" alt="" border="0"/></sup></a></span></p>

<p>provide additional reading<br/>
<a href="/confluence/display/SM/Creating+a+protocol+bridge" title="Creating a protocol bridge">Creating a protocol bridge</a>.for a "bigger" example<br/>
The <a href="/confluence/display/SM/Examples" title="Examples">examples</a> page lists examples providing more information, showing further possibilities and components.</p></td></tr></table>

<h2><a name="HelloWorld-BC-AdditionalResources"></a>Additional Resources </h2>

<ul>
	<li><a href="/confluence/display/SM/Creating+a+Standard+JBI+Component" title="Creating a Standard JBI Component">Creating a Standard JBI Component</a></li>
	<li><a href="/confluence/display/SM/Notes+on+Creating+JBI+Component+using+maven2" title="Notes on Creating JBI Component using maven2">Notes on Creating JBI Component using maven2</a></li>
	<li><a href="/confluence/display/SM/Roadmap+for+a+perspective+Servicemix+developer" title="Roadmap for a perspective Servicemix developer">Roadmap for a perspective Servicemix developer</a></li>
</ul>
</div>


</td></tr></table></div>
<p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td height="12" background="http://cwiki.apache.org/confluence/images/border/border_bottom.gif"><img src="http://cwiki.apache.org/confluence/images/border/spacer.gif" width="1" height="1" border="0"/></td>
    </tr>
</table>

<div class="smalltext">
    Powered by
    <a href="http://www.atlassian.com/software/confluence/default.jsp?clicked=footer" class="smalltext">Atlassian Confluence</a>
    (Version: 2.2.9 Build:#527 Sep 07, 2006)
    -
    <a href="http://jira.atlassian.com/secure/BrowseProject.jspa?id=10470" class="smalltext">Bug/feature request</a><br/>
    <br>
    <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action">Unsubscribe or edit your notifications preferences</a>

</div>

</body>
</html>


Mime
View raw message