blob: 08377d0ee0418ad241e1f4b9a6e06b124dd62abc [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="SMILA/Documentation/HowTo/How to integrate the HelloWorld webservice as a Pipelet,SMILA/Development Guidelines,SMILA/Development Guidelines/Create a bundle (plug-in),SMILA/Development Guidelines/How to export a bundle,SMILA/Development Guidelines/How to integrate new bundle into build process,SMILA/Glossary,SMILA/Howto integrate a component in SMILA,SMILA/Glossary/" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/SMILA/Documentation/HowTo/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (English)" />
<link rel="alternate" type="application/rss+xml" title="Eclipsepedia RSS Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=atom" />
<title>SMILA/Documentation/HowTo/How to integrate the HelloWorld webservice as a Pipelet - Eclipsepedia</title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "http://wiki.eclipse.org/skins/eclipsenova/novaWide.css?116"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="http://wiki.eclipse.org/skins/eclipsenova/eclipsenovaPrint.css?116" />
<link rel="stylesheet" type="text/css" media="handheld" href="http://wiki.eclipse.org/skins/eclipsenova/handheld.css?116" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/header.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/tabs.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/visual.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/layout.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/footer.css" media="screen" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/skins/eclipsenova/IEpngfix.css" media="screen" /><![endif]-->
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE50Fixes.css?116";</style> <![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE55Fixes.css?116";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/skins/eclipsenova/IE60Fixes.css?116";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/skins/eclipsenova/IE70Fixes.css?116";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/skins/common/IEFixes.js?116"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "eclipsenova";
var stylepath = "/skins";
var wgArticlePath = "/$1";
var wgScriptPath = "";
var wgScript = "/index.php";
var wgServer = "http://wiki.eclipse.org";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet";
var wgTitle = "SMILA/Documentation/HowTo/How to integrate the HelloWorld webservice as a Pipelet";
var wgAction = "view";
var wgRestrictionEdit = [];
var wgRestrictionMove = [];
var wgArticleId = "16093";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "319925";
var wgVersion = "1.12.0";
var wgEnableAPI = true;
var wgEnableWriteAPI = false;
/*]]>*/</script>
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/wikibits.js?116"><!-- wikibits js --></script>
<!-- Performance mods similar to those for bug 166401 -->
<script type="text/javascript" src="http://wiki.eclipse.org/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=eclipsenova"><!-- site js --></script>
<!-- Head Scripts -->
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/ajax.js?116"></script>
<style type="text/css">/*<![CDATA[*/
.source-text {line-height: normal; font-size: medium;}
.source-text li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for text
* CSS class: source-text, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-text .de1, .source-text .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-text {}
.source-text .head {}
.source-text .foot {}
.source-text .imp {font-weight: bold; color: red;}
.source-text .ln-xtra {color: #cc0; background-color: #ffc;}
.source-text li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-text li.li2 {font-weight: bold;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "http://wiki.eclipse.org/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-java {line-height: normal; font-size: medium;}
.source-java li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for java
* CSS class: source-java, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-java .de1, .source-java .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-java {}
.source-java .head {}
.source-java .foot {}
.source-java .imp {font-weight: bold; color: red;}
.source-java .ln-xtra {color: #cc0; background-color: #ffc;}
.source-java li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-java li.li2 {font-weight: bold;}
.source-java .kw1 {color: #7F0055; font-weight: bold;}
.source-java .kw2 {color: #7F0055; font-weight: bold;}
.source-java .kw3 {color: #000000; font-weight: normal}
.source-java .kw4 {color: #7F0055; font-weight: bold;}
.source-java .co1 {color: #3F7F5F; font-style: italic;}
.source-java .co2 {color: #3F7F5F;}
.source-java .co3 {color: #3F7F5F; font-style: italic; font-weight: bold;}
.source-java .coMULTI {color: #3F5FBF; font-style: italic;}
.source-java .es0 {color: #000000;}
.source-java .br0 {color: #000000;}
.source-java .st0 {color: #2A00ff;}
.source-java .nu0 {color: #000000;}
.source-java .me1 {color: #000000;}
.source-java .me2 {color: #000000;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "http://wiki.eclipse.org/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><style type="text/css">/*<![CDATA[*/
.source-xml {line-height: normal; font-size: medium;}
.source-xml li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for xml
* CSS class: source-xml, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-xml .de1, .source-xml .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-xml {}
.source-xml .head {}
.source-xml .foot {}
.source-xml .imp {font-weight: bold; color: red;}
.source-xml .ln-xtra {color: #cc0; background-color: #ffc;}
.source-xml li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-xml li.li2 {font-weight: bold;}
.source-xml .coMULTI {color: #808080; font-style: italic;}
.source-xml .es0 {color: #000099; font-weight: bold;}
.source-xml .br0 {color: #66cc66;}
.source-xml .st0 {color: #ff0000;}
.source-xml .nu0 {color: #cc66cc;}
.source-xml .sc0 {color: #00bbdd;}
.source-xml .sc1 {color: #ddbb00;}
.source-xml .sc2 {color: #339933;}
.source-xml .sc3 {color: #009900;}
.source-xml .re0 {color: #000066;}
.source-xml .re1 {font-weight: bold; color: black;}
.source-xml .re2 {font-weight: bold; color: black;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "http://wiki.eclipse.org/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><link rel="stylesheet" type="text/css" href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html" /> </head>
<body class="mediawiki ns-0 ltr page-SMILA_Documentation_HowTo_How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet">
<div id="globalWrapper">
<div id="column-one">
<!-- Eclipse Additions for the Top Nav start here M. Ward-->
<div id="header">
<div id="header-graphic">
<img src="http://wiki.eclipse.org/skins/eclipsenova/eclipse.png" alt="Eclipse Wiki">
</div>
<!-- Pulled 101409 Mward -->
<div class="portlet" id="p-personal">
<div class="pBody">
<ul>
<li id="pt-login"><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet">Log in</a></li>
</ul>
</div>
</div>
<div id="header-icons">
<div id="sites">
<ul id="sitesUL">
<li><a href="http://www.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/eclipseIcon.png" width="28" height="28" alt="Eclipse Foundation" title="Eclipse Foundation" /><div>Eclipse Foundation</div></a></li>
<li><a href="http://marketplace.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/marketplace.png" width="28" height="28" alt="Eclipse Marketplace" title="Eclipse Marketplace" /><div>Eclipse Marketplace</div></a></li>
<li><a href="https://bugs.eclipse.org/bugs"><img src="http://dev.eclipse.org/custom_icons/system-search-bw.png" width="28" height="28" alt="Bugzilla" title="Bugzilla" /><div>Bugzilla</div></a></li>
<li><a href="http://live.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/audio-input-microphone-bw.png" width="28" height="28" alt="Live" title="Live" /><div>Eclipse Live</div></a></li>
<li><a href="http://planeteclipse.org"><img src="http://dev.eclipse.org/large_icons/devices/audio-card.png" width="28" height="28" alt="PlanetEclipse" title="Planet" /><div>Planet Eclipse</div></a></li>
<li><a href="http://portal.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/preferences-system-network-proxy-bw.png" width="28" height="28" alt="Portal" title="Portal" /><div>My Foundation Portal</div></a></li>
</ul>
</div>
</div>
</div>
<!-- NEW HEADER STUFF HERE -->
<div id="header-menu">
<div id="header-nav">
<ul> <li><a class="first_one" href="http://wiki.eclipse.org/" target="_self">Home</a></li> <li><a href="http://www.eclipse.org/downloads/" target="_self">Downloads</a></li>
<li><a href="http://www.eclipse.org/users/" target="_self">Users</a></li>
<li><a href="http://www.eclipse.org/membership/" target="_self">Members</a></li>
<li><a href="http://wiki.eclipse.org/index.php/Development_Resources" target="_self">Committers</a></li>
<li><a href="http://www.eclipse.org/resources/" target="_self">Resources</a></li>
<li><a href="http://www.eclipse.org/projects/" target="_self">Projects</a></li>
<li><a href="http://www.eclipse.org/org/" target="_self">About Us</a></li>
</ul>
</div>
<div id="header-utils">
<!-- moved the search window here -->
<form action="http://wiki.eclipse.org/Special:Search" >
<input class="input" name="search" type="text" accesskey="f" value="" />
<input type='submit' onclick="this.submit();" name="go" id="searchGoButton" class="button" title="Go to a page with this exact name if one exists" value="Go" />&nbsp;
<input type='submit' onclick="this.submit();" name="fulltext" class="button" id="mw-searchButton" title="Search Eclipsepedia for this text" value="Search" />
</form>
</div>
</div>
<!-- Eclipse Additions for the Header stop here -->
<!-- Additions and mods for leftside nav Start here -->
<!--Started nav rip here-->
<!-- these are the nav controls main page, changes etc -->
<div id="novaContent" class="faux">
<div id="leftcol">
<ul id="leftnav">
<!-- these are the page controls, edit history etc -->
<li class="separator"><a class="separator">Navigation &#160;&#160;</li>
<li id="n-mainpage"><a href="http://wiki.eclipse.org/Main_Page">Main Page</a></li>
<li id="n-portal"><a href="http://wiki.eclipse.org/Eclipsepedia:Community_Portal">Community portal</a></li>
<li id="n-currentevents"><a href="http://wiki.eclipse.org/Eclipsepedia:Current_events">Current events</a></li>
<li id="n-recentchanges"><a href="http://wiki.eclipse.org/Special:Recentchanges">Recent changes</a></li>
<li id="n-randompage"><a href="http://wiki.eclipse.org/Special:Random">Random page</a></li>
<li id="n-help"><a href="http://wiki.eclipse.org/Help:Contents">Help</a></li>
<li class="separator"><a class="separator">Toolbox &#160;&#160;</a></li>
<li id="t-whatlinkshere"><a href="http://wiki.eclipse.org/Special:Whatlinkshere/SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet">What links here</a></li>
<li id="t-recentchangeslinked"><a href="http://wiki.eclipse.org/Special:Recentchangeslinked/SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet">Related changes</a></li>
<!-- This is the toolbox section -->
<li id="t-upload"><a href="http://wiki.eclipse.org/Special:Upload">Upload file</a></li>
<li id="t-specialpages"><a href="http://wiki.eclipse.org/Special:Specialpages">Special pages</a></li>
<li id="t-print"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet&amp;printable=yes">Printable version</a></li> <li id="t-permalink"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet&amp;oldid=319925">Permanent link</a></li> </ul>
</div>
<!-- Additions and mods for leftside nav End here -->
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<div id="tabs">
<ul class="primary">
<li class="active"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html"><span class="tab">Page</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet&amp;action=edit"><span class="tab">Discussion</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet&amp;action=edit"><span class="tab">View source</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet&amp;action=history"><span class="tab">History</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/HowTo/How&#32;to&#32;integrate&#32;the&#32;HelloWorld&#32;webservice&#32;as&#32;a&#32;Pipelet"><span class="tab">Edit</span></a></li>
</ul>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<h1 class="firstHeading">SMILA/Documentation/HowTo/How to integrate the HelloWorld webservice as a Pipelet</h1>
<div id="bodyContent">
<h3 id="siteSub">From Eclipsepedia</h3>
<div id="contentSub"><span class="subpages">&lt; <a href="../../../SMILA.html" title="SMILA">SMILA</a> | <a href="../../Documentation.1.html" title="SMILA/Documentation">Documentation</a> | <a href="../HowTo.html" title="SMILA/Documentation/HowTo">HowTo</a></span></div>
<div id="jump-to-nav">Jump to: <a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#column-one">navigation</a>, <a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#searchInput">search</a></div> <!-- start content -->
<p>This page illustrates all steps that need to be performed in order to integrate the HelloWorld web service as a <a href="../../Glossary.html#P" title="SMILA/Glossary">pipelet</a> in SMILA. For general information on how to integrate components and add functionality to SMILA refer to <a href="../../Howto_integrate_a_component_in_SMILA.html" class="mw-redirect" title="SMILA/Howto integrate a component in SMILA"> How to integrate a component in SMILA</a>.
</p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Preparations"><span class="tocnumber">1</span> <span class="toctext">Preparations</span></a>
<ul>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Create_new_bundle"><span class="tocnumber">1.1</span> <span class="toctext">Create new bundle</span></a></li>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Create_Java_classes_from_WSDL_using_Axis2"><span class="tocnumber">1.2</span> <span class="toctext">Create Java classes from WSDL using Axis2</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Implementation"><span class="tocnumber">2</span> <span class="toctext">Implementation</span></a>
<ul>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Read_PipeletConfiguration"><span class="tocnumber">2.1</span> <span class="toctext">Read PipeletConfiguration</span></a></li>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Process_IDs_and_implement_exception_handling"><span class="tocnumber">2.2</span> <span class="toctext">Process IDs and implement exception handling</span></a></li>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#evaluate_configuration_parameters"><span class="tocnumber">2.3</span> <span class="toctext">evaluate configuration parameters</span></a></li>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Read_input_data"><span class="tocnumber">2.4</span> <span class="toctext">Read input data</span></a></li>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Process_input_data"><span class="tocnumber">2.5</span> <span class="toctext">Process input data</span></a></li>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Write_output_data"><span class="tocnumber">2.6</span> <span class="toctext">Write output data</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Configuration_and_invocation_in_BPEL"><span class="tocnumber">3</span> <span class="toctext">Configuration and invocation in BPEL</span></a></li>
<li class="toclevel-1"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Build_and_Test_your_pipelet"><span class="tocnumber">4</span> <span class="toctext">Build and Test your pipelet</span></a>
<ul>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Source_Code_Distribution"><span class="tocnumber">4.1</span> <span class="toctext">Source Code Distribution</span></a></li>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Binary_Distribution"><span class="tocnumber">4.2</span> <span class="toctext">Binary Distribution</span></a></li>
<li class="toclevel-2"><a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html#Troubleshooting"><span class="tocnumber">4.3</span> <span class="toctext">Troubleshooting</span></a></li>
</ul>
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<a name="Preparations"></a><h2> <span class="mw-headline"> Preparations </span></h2>
<p>It may be helpful to first take a look at the SMILA <a href="../../Development_Guidelines.1.html" title="SMILA/Development Guidelines">Development guidelines</a> as many topics that are beyond the scope of this tutorial are illustrated there.
</p>
<a name="Create_new_bundle"></a><h3> <span class="mw-headline"> Create new bundle </span></h3>
<ul><li> Create a new bundle that should contain your pipelet. Follow the instructions on <a href="../../Development_Guidelines/Create_a_bundle_(plug-in).html" class="mw-redirect" title="SMILA/Development Guidelines/Create a bundle (plug-in)">How to create a bundle</a> and use the following settings:
</li></ul>
<pre>
Project name: org.eclipse.smila.sample.pipelet
Plug-in ID: org.eclipse.smila.sample.pipelet
Plug-in Version: 1.0.0
Plug-in Name: Sample Pipelet Bundle
Plug-in Provider: your name or company
</pre>
<ul><li> Edit the file <tt>META-INF/MANIFEST.MF</tt> and add the following import-package dependencies as those are required to implement the basic functionalities of your pipelet:
</li></ul>
<pre>
Import-Package: org.apache.commons.logging;version=&quot;1.1.1&quot;,
org.eclipse.smila.blackboard;version=&quot;0.8.0&quot;,
org.eclipse.smila.datamodel;version=&quot;0.8.0&quot;,
org.eclipse.smila.processing;version=&quot;0.8.0&quot;
</pre>
<ul><li> To make sure that the <tt>PipeletTrackerService</tt> detects your new pipelet, create a folder <tt>SMILA-INF</tt> in the bundle and add a file <tt>HelloWorldPipelet.json</tt> to this folder:
</li></ul>
<pre>
{
&quot;class&quot;: &quot;org.eclipse.smila.sample.pipelet.HelloWorldPipelet&quot;,
&quot;parameters&quot;: [
{
&quot;name&quot;: &quot;IN_ATT_NAME&quot;,
&quot;type&quot;: &quot;string&quot;
},
{
&quot;name&quot;: &quot;OUT_ATT_NAME&quot;,
&quot;type&quot;: &quot;string&quot;
}
],
&quot;description&quot;: &quot;Hello World pipelet. Modifies the content of the attribut denoted by the parameter IN_ATT_NAME to the attribute denoted by the parameter OUT_ATT_NAME.&quot;
}
</pre>
<ul><li>Now add the folder <tt>SMILA-INF</tt> to the build.properties (or just check it in the <tt>Build</tt> view of the <tt>MANIFEST.MF</tt> file in your IDE.
</li></ul>
<a name="Create_Java_classes_from_WSDL_using_Axis2"></a><h3> <span class="mw-headline"> Create Java classes from WSDL using Axis2 </span></h3>
<ul><li> Install Axis2 1.4.1: Download from <a href="http://ws.apache.org/axis2/download/1_4_1/download.cgi" class="external free" title="http://ws.apache.org/axis2/download/1_4_1/download.cgi" rel="nofollow">http://ws.apache.org/axis2/download/1_4_1/download.cgi</a> and unpack into any directory.
</li><li> Open a shell in the Axis2 directory and execute <tt>wsdl2java</tt> similar to this example - replace the WSDL-URL with that of the Webservice you want to use after <tt>-uri</tt>, change the package name after <tt>-p</tt> and the output directory after <tt>-o</tt>:
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-text">bin\wsdl2java -uri http://localhost:8081/axis2/services/HelloWorld.HelloWorldImplPort?wsdl
-d xmlbeans -p org.eclipse.smila.sample.helloworld -s -o helloworld-ws</pre></div>
<dl><dd> This creates two folders inside <tt>helloworld-ws</tt>: <tt>src</tt> and <tt>resources</tt>.
</dd><dd> If you do not want to run the generator inside the Axis2 installation you must set an environment variable <tt>AXIS2_HOME</tt> to the Axis2 installation directory.
</dd></dl>
<ul><li> Add Import-Package declarations with minimum versions as available in your target platform (they will be set automatically if you use the Manifest editor's Dependencies tab to add them). To run this example at least these are needed (with valid versions at the time of writing):
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-text">javax.xml.stream;version=&quot;1.0.1&quot;,
org.apache.axiom.om;version=&quot;1.2.7&quot;,
org.apache.axiom.om.impl;version=&quot;1.2.7&quot;,
org.apache.axiom.om.impl.llom;version=&quot;1.2.7&quot;,
org.apache.axiom.soap;version=&quot;1.2.7&quot;,
org.apache.axis2;version=&quot;1.4.1&quot;,
org.apache.axis2.addressing;version=&quot;1.4.1&quot;,
org.apache.axis2.client;version=&quot;1.4.1&quot;,
org.apache.axis2.context;version=&quot;1.4.1&quot;,
org.apache.axis2.description;version=&quot;1.4.1&quot;,
org.apache.axis2.transport;version=&quot;1.4.1&quot;,
org.apache.axis2.transport.http;version=&quot;1.4.1&quot;,
org.apache.axis2.wsdl;version=&quot;1.4.1&quot;,
org.apache.xmlbeans;version=&quot;2.3.0&quot;,
org.apache.xmlbeans.impl.schema;version=&quot;2.3.0&quot;,
org.apache.xmlbeans.impl.values;version=&quot;2.3.0&quot;,
org.apache.xmlbeans.xml.stream;version=&quot;2.3.0&quot;</pre></div>
<dl><dd> You will not get compile errors if the import for <tt>org.apache.xmlbeans.impl.schema</tt> is missing, but it is needed during runtime.
</dd><dd> For more complex webservices, additional imports may be required. Check the imported generated client code for compile errors.
</dd></dl>
<ul><li> Create a source folder <tt>code/gen</tt> in your bundle and move the <b>content</b> of the generated <tt>src</tt> folder into it.
</li><li> Create a folder <tt>lib</tt> in your bundle, create a zip file from the <b>content</b> of the generated <tt>resources</tt> folder, change the suffix to <tt>jar</tt> and move it to <tt>lib</tt>. Refresh the bundle in your Eclipse workspace, and add this jar to the Bundle-Classpath of your bundle (Manifest editor, tab Runtime, Classpath setting).
</li></ul>
<p><br />
</p>
<a name="Implementation"></a><h2> <span class="mw-headline"> Implementation </span></h2>
<ul><li> Create the package <tt>org.eclipse.smila.sample.pipelet</tt> and the Java class <tt>HelloWorldPipelet</tt>.
</li><li> Use the following code as a template for your new class. It contains empty method bodies and a reference to the logger. In the following we are going to gradually replace the comments in this file by the corresponding code snippets. For your convenience you may also download the complete zipped source file from <a href="http://wiki.eclipse.org/images/7/75/HelloWorldPipelet_0.9.zip" class="internal" title="HelloWorldPipelet 0.9.zip">HelloWorldPipelet.zip</a>.
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-java"><span class="kw1">package</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">sample</span>.<span class="me1">pipelet</span>
&nbsp;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">axis2</span>.<span class="me1">transport</span>.<span class="me1">http</span>.<span class="me1">HTTPConstants</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">commons</span>.<span class="me1">logging</span>.<span class="me1">Log</span>;
<span class="kw1">import</span> org.<span class="me1">apache</span>.<span class="me1">commons</span>.<span class="me1">logging</span>.<span class="me1">LogFactory</span>;
<span class="kw1">import</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">blackboard</span>.<span class="me1">Blackboard</span>;
<span class="kw1">import</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">datamodel</span>.<span class="me1">AnyMap</span>;
<span class="kw1">import</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">datamodel</span>.<span class="me1">Value</span>;
<span class="kw1">import</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">processing</span>.<span class="me1">Pipelet</span>;
<span class="kw1">import</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">processing</span>.<span class="me1">ProcessingException</span>;
<span class="kw1">import</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">processing</span>.<span class="me1">parameters</span>.<span class="me1">ParameterAccessor</span>;
<span class="kw1">import</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">processing</span>.<span class="me1">util</span>.<span class="me1">ProcessingConstants</span>;
<span class="kw1">import</span> org.<span class="me1">eclipse</span>.<span class="me1">smila</span>.<span class="me1">processing</span>.<span class="me1">util</span>.<span class="me1">ResultCollector</span>;
&nbsp;
<span class="kw1">import</span> com.<span class="me1">empolis</span>.<span class="me1">smila</span>.<span class="me1">sample</span>.<span class="me1">helloworld</span>.<span class="me1">HelloWorldStub</span>;
&nbsp;
<span class="kw1">import</span> demo.<span class="me1">hw</span>.<span class="me1">server</span>.<span class="me1">SayHi</span>;
<span class="kw1">import</span> demo.<span class="me1">hw</span>.<span class="me1">server</span>.<span class="me1">SayHiDocument</span>;
<span class="kw1">import</span> demo.<span class="me1">hw</span>.<span class="me1">server</span>.<span class="me1">SayHiResponse</span>;
<span class="kw1">import</span> demo.<span class="me1">hw</span>.<span class="me1">server</span>.<span class="me1">SayHiResponseDocument</span>;
&nbsp;
<span class="kw1">public</span> <span class="kw1">class</span> HelloWorldPipelet <span class="kw1">implements</span> Pipelet <span class="br0">&#123;</span>
&nbsp;
<span class="co1">// additional member variables or constants</span>
<span class="kw1">private</span> <span class="kw1">final</span> Log _log = LogFactory.<span class="me1">getLog</span><span class="br0">&#40;</span>getClass<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;
&nbsp;
<span class="kw1">public</span> HelloWorldPipelet<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">public</span> <span class="kw4">void</span> configure<span class="br0">&#40;</span><span class="kw1">final</span> AnyMap configuration<span class="br0">&#41;</span> <span class="kw1">throws</span> ProcessingException <span class="br0">&#123;</span>
<span class="co1">// read the configuration properties</span>
<span class="br0">&#125;</span>
&nbsp;
<span class="kw1">public</span> <span class="kw3">String</span><span class="br0">&#91;</span><span class="br0">&#93;</span> process<span class="br0">&#40;</span><span class="kw1">final</span> Blackboard blackboard, <span class="kw1">final</span> <span class="kw3">String</span><span class="br0">&#91;</span><span class="br0">&#93;</span> recordIds<span class="br0">&#41;</span> <span class="kw1">throws</span> ProcessingException <span class="br0">&#123;</span>
<span class="co1">// process the recordIds and create a result</span>
<span class="kw1">return</span> <span class="kw2">null</span>;
<span class="br0">&#125;</span>
<span class="br0">&#125;</span></pre></div>
<a name="Read_PipeletConfiguration"></a><h3> <span class="mw-headline"> Read PipeletConfiguration </span></h3>
<ul><li> First let's create two constants for the property names used in the configuration (or the parameters section of the records to be processed) to retrieve the names of the source and target attribute. Replace the comment "<tt>// additional member variables or constants</tt>" with the following code snippet.
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-java"><span class="kw1">private</span> <span class="kw1">final</span> <span class="kw3">String</span> PROP_IN_ATT_NAME = <span class="st0">&quot;IN_ATT_NAME&quot;</span>;
&nbsp;
<span class="kw1">private</span> <span class="kw1">final</span> <span class="kw3">String</span> PROP_OUT_ATT_NAME = <span class="st0">&quot;OUT_ATT_NAME&quot;</span>;
&nbsp;
<span class="kw1">private</span> AnyMap _config;</pre></div>
<ul><li> Then we are going to store the the <tt>PipeletConfiguration</tt> in method <tt>configure(final AnyMap configuration)</tt> for later evalutaion in <tt>process(final Blackboard blackboard, final String[] recordIds)</tt>. So we will allow the user of this pipelet to either use the pipelet configuration to configure the attributes as well as the records themselves (e.g. the administrator could define the attributes in a job, these job properties can override default pipelet configuration properties when using the <tt>ParameterAccessor</tt> in the process method).
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-java">@Override
<span class="kw1">public</span> <span class="kw4">void</span> configure<span class="br0">&#40;</span><span class="kw1">final</span> AnyMap configuration<span class="br0">&#41;</span> <span class="kw1">throws</span> ProcessingException <span class="br0">&#123;</span>
_config = configuration;
<span class="br0">&#125;</span></pre></div>
<p><b>Note</b>: It would also be possible to use and configure member variables directly in the configure method and not use the ParameterAccessor to retrieve configuration parameters in the process method. You can do so for properties that won't change during operation or will always stay the same for each record, no matter what the parameters of the record contain. Or for lengthy initialization like reading and parsing configuration from files and such. In these cases you should use member variables that are initialized in the configuration method using only the information from the PipeletConfiguration. but you should clearly document which parameters can only be defined with the PipeletConfiguration and which can be overridden in the records.
</p>
<a name="Process_IDs_and_implement_exception_handling"></a><h3> <span class="mw-headline"> Process IDs and implement exception handling </span></h3>
<p>The method <tt>process(Blackboard blackboard, String[] recordIds)</tt> has two parameters:
</p>
<ul><li> a reference to the <a href="../../Glossary.html#B" title="SMILA/Glossary">blackboard service</a> that allows access on <a href="../../Glossary.html#R" title="SMILA/Glossary">records</a> and
</li><li> a list of record IDs to process.
</li></ul>
<p>&lt;The HelloWorld pipelet should therefore iterate over the IDs in the parameter <tt>recordIds</tt>, get the required data from the record identified by the ID, process this data, and store the result in the record.
</p><p>It is suggested that you use the <tt>org.eclipse.smila.processing.util.ResultCollector</tt> utility class to cope with result id collection that also provides a configurable exception handling approach. When creating the ResultCollector, you have to decide whether records that cause an exception will be excepted from the result set or if they will stay in the result set. We will use the system wide default <tt>ProcessingConstants.DROP_ON_ERROR_DEFAULT</tt> which is set to <tt>false</tt>. The ResultCollector will also check the ParameterAccessor for the parameter <tt>_failOnError</tt> (default: <tt>false</tt>).
</p><p>Let's place a <tt>try ... catch()</tt> block in the <tt>for</tt> loop to ensure that errors do only interrupt the processing of the current ID. The comments in the code serve as placeholders for the functionality described in the following sections. At the end we ask the ResulotCollector for the set of <tt>recordIds</tt> as the result of the pipelet. Replace the comment "<tt>// process the recordIds and create a result</tt>" with the following code snippet.
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-java"><span class="kw1">final</span> ParameterAccessor paramAccessor = <span class="kw1">new</span> ParameterAccessor<span class="br0">&#40;</span>blackboard, _config<span class="br0">&#41;</span>;
<span class="kw1">final</span> ResultCollector resultCollector =
<span class="kw1">new</span> ResultCollector<span class="br0">&#40;</span>paramAccessor, _log, ProcessingConstants.<span class="me1">DROP_ON_ERROR_DEFAULT</span><span class="br0">&#41;</span>;
<span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw3">String</span> id&nbsp;: recordIds<span class="br0">&#41;</span> <span class="br0">&#123;</span>
<span class="kw1">try</span> <span class="br0">&#123;</span>
<span class="co1">// read your configuration using the parameteraccessor</span>
paramAccessor.<span class="me1">setCurrentRecord</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span>;
<span class="co1">// read configuration from the accessor</span>
&nbsp;
<span class="co1">// Read Input Data</span>
&nbsp;
<span class="co1">// Process Input Data</span>
&nbsp;
<span class="co1">// Write Output Data</span>
&nbsp;
<span class="co1">// add the id for a successful operation</span>
resultCollector.<span class="me1">addResult</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span>;
<span class="br0">&#125;</span> <span class="kw1">catch</span> <span class="br0">&#40;</span><span class="kw1">final</span> <span class="kw3">Exception</span> ex<span class="br0">&#41;</span> <span class="br0">&#123;</span>
<span class="co1">// mark the id for a failed record and let the result collector handle the exception as configured</span>
resultCollector.<span class="me1">addFailedResult</span><span class="br0">&#40;</span>id, e<span class="br0">&#41;</span>;
<span class="br0">&#125;</span>
<span class="br0">&#125;</span> <span class="co1">// for</span>
&nbsp;
<span class="co1">// let the ResultColletor decide which ids to return:</span>
<span class="kw1">return</span> resultCollector.<span class="me1">getResultIds</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</pre></div>
<p><b>Note</b>: Most of the time the return value of a pipelet is the same set of record ids as was processed (<tt>recordIds</tt>). However, in some cases a pipelet may filter record IDs or even create new records. Then the record IDs of the records to be filtered out should not be added to the ResultCollector and new record IDs have to be added to the ResultCollector in order to get the correct set of IDs as the result of the process method.
</p>
<a name="evaluate_configuration_parameters"></a><h3> <span class="mw-headline"> evaluate configuration parameters </span></h3>
<p>Now we have to determine the source an target attribute names that have to be provided with the configuration parameters <tt>PROP_IN_ATT_NAME</tt> and <tt>PROP_OUT_ATT_NAME</tt>. Therefore we first have to determine the attribute names using the parameter accessor (Note: if we didn't want to let job parameters change these attributes, we could have evaluated the piplet configuration in the configure method and stored the result in member variables, but we want to be flexible here in this example).
Replace the comment <tt>// read configuration from the accessor</tt> with the following snippet:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-java"><span class="kw1">final</span> <span class="kw3">String</span> inAttName = paramAccessor.<span class="me1">getRequiredParameter</span><span class="br0">&#40;</span>PROP_IN_ATT_NAME<span class="br0">&#41;</span>;
<span class="kw1">if</span> <span class="br0">&#40;</span>inAttName.<span class="me1">trim</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">length</span><span class="br0">&#40;</span><span class="br0">&#41;</span> == <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
<span class="kw1">throw</span> <span class="kw1">new</span> ProcessingException<span class="br0">&#40;</span><span class="st0">&quot;Property &quot;</span> + PROP_IN_ATT_NAME + <span class="st0">&quot; must not be an empty String&quot;</span><span class="br0">&#41;</span>;
<span class="br0">&#125;</span>
<span class="kw1">final</span> <span class="kw3">String</span> outAttName = paramAccessor.<span class="me1">getRequiredParameter</span><span class="br0">&#40;</span>PROP_OUT_ATT_NAME<span class="br0">&#41;</span>;
<span class="kw1">if</span> <span class="br0">&#40;</span>outAttName.<span class="me1">trim</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">length</span><span class="br0">&#40;</span><span class="br0">&#41;</span> == <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
<span class="kw1">throw</span> <span class="kw1">new</span> ProcessingException<span class="br0">&#40;</span><span class="st0">&quot;Property &quot;</span> + PROP_OUT_ATT_NAME + <span class="st0">&quot; must not be an empty String&quot;</span><span class="br0">&#41;</span>;
<span class="br0">&#125;</span></pre></div>
<a name="Read_input_data"></a><h3> <span class="mw-headline"> Read input data </span></h3>
<p>Now we want to read the data of the attribute we stored in <tt>inAttName</tt>.
Replace the comment "<tt>// Read Input Data</tt>" with the following code snippet.
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-java"><span class="kw3">String</span> inputValue = <span class="st0">&quot;&quot;</span>;
<span class="kw1">if</span> <span class="br0">&#40;</span>blackboard.<span class="me1">getMetadata</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span>.<span class="me1">containsKey</span><span class="br0">&#40;</span>inAttName<span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span>
inputValue = blackboard.<span class="me1">getMetadata</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span>.<span class="me1">getStringValue</span><span class="br0">&#40;</span>inAttName<span class="br0">&#41;</span>;
<span class="br0">&#125;</span></pre></div>
<p><b>Note</b>: Accessing attribute values can be achieved more generically. Therefore you have to check what data type a certain attribute contains using the method <tt>getValueType()</tt> (or the checking methods <tt>isBoolean()</tt>... etc.). Then you can use the appropriate getter method to access the raw data.
</p>
<a name="Process_input_data"></a><h3> <span class="mw-headline"> Process input data </span></h3>
<p>Now we will call the HelloWorld web service with the parameter <tt>inputValue</tt> and store the result in variable <tt>outputValue</tt>. Therefore we use the classes generated from WSDL by Axis2. The HelloWorld web service will return a String message in the format <tt>"Hello "</tt> + the content of variable <tt>inputValue</tt>. Replace the comment "<tt>// Process Input Data</tt>" with the following code snippet.
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-java">HelloWorldStub ws = <span class="kw1">new</span> HelloWorldStub<span class="br0">&#40;</span><span class="st0">&quot;http://localhost:8081/axis2/services/HelloWorld.HelloWorldImplPort&quot;</span><span class="br0">&#41;</span>;
ws._getServiceClient<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getOptions</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">setProperty</span><span class="br0">&#40;</span>HTTPConstants.<span class="me1">CHUNKED</span>, <span class="kw3">Boolean</span>.<span class="kw2">FALSE</span><span class="br0">&#41;</span>;
SayHiDocument sayHiDoc = SayHiDocument.<span class="me1">Factory</span>.<span class="me1">newInstance</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;
SayHi sayHi = sayHiDoc.<span class="me1">addNewSayHi</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;
sayHi.<span class="me1">setArg0</span><span class="br0">&#40;</span>inputValue<span class="br0">&#41;</span>;
SayHiResponseDocument respDoc = ws.<span class="me1">sayHi</span><span class="br0">&#40;</span>sayHiDoc<span class="br0">&#41;</span>;
SayHiResponse response = respDoc.<span class="me1">getSayHiResponse</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;
<span class="kw3">String</span> outputValue = response.<span class="me1">getReturn</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</pre></div>
<a name="Write_output_data"></a><h3> <span class="mw-headline"> Write output data </span></h3>
<p>Finally, we want to store the content of the variable <tt>outputValue</tt> in the record attribute with the name contained in variable <tt>outAttName</tt>. Therefore we have to create a new <tt>Value</tt> object and set its value. Then we only need to set this <tt>Value</tt> for the current ID on the black board.
Replace the comment "<tt>// Write Output Data</tt>" with the following code snippet.
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-java"><span class="kw1">final</span> Value outLiteral = blackboard.<span class="me1">getDataFactory</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">createStringValue</span><span class="br0">&#40;</span>outputValue<span class="br0">&#41;</span>;
blackboard.<span class="me1">getMetadata</span><span class="br0">&#40;</span>id<span class="br0">&#41;</span>.<span class="me1">put</span><span class="br0">&#40;</span>outAttName, outLiteral<span class="br0">&#41;</span>;</pre></div>
<p><b>Note</b>: The method <tt>commit(Id)</tt> of the blackboard service does not need to be called in each pipelet as it is automatically called at the end of the <a href="http://wiki.eclipse.org/index.php?title=SMILA/Glossary/&amp;action=edit" class="new" title="SMILA/Glossary/">pipeline</a>.
</p>
<a name="Configuration_and_invocation_in_BPEL"></a><h2> <span class="mw-headline"> Configuration and invocation in BPEL </span></h2>
<p>In this tutorial we will integrate the HelloWorld pipelet in the SMILA indexing process just before the record is stored in the Solr core. With this configuration the input for the HelloWorld pipelet will be read from attribute <i>Title</i> and the modified output will be stored in the same attribute, overwriting the previous value.
</p>
<ul><li> Edit the file <tt>configuration/org.eclipse.smila.processing.bpel/pipelines/addpipeline.bpel</tt> and add the following right between the <tt>&lt;extensionActivity name="convertDocument"&gt;</tt> and the <tt>&lt;extensionActivity name="SolrIndexPipelet"&gt;</tt> section.
</li></ul>
<div dir="ltr" style="text-align: left;"><pre class="source-xml"><span class="sc3"><span class="re1">&lt;extensionActivity<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;proc:invokePipelet</span> <span class="re0">name</span>=<span class="st0">&quot;invokeHelloWorldPipelet&quot;</span><span class="re2">&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:pipelet</span> <span class="re0">class</span>=<span class="st0">&quot;org.eclipse.smila.sample.pipelet.HelloWorldPipelet&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:variables</span> <span class="re0">input</span>=<span class="st0">&quot;request&quot;</span> <span class="re0">output</span>=<span class="st0">&quot;request&quot;</span> <span class="re2">/&gt;</span></span>
<span class="sc3"><span class="re1">&lt;proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Value</span> <span class="re0">name</span>=<span class="st0">&quot;IN_ATT_NAME&quot;</span><span class="re2">&gt;</span></span>Title<span class="sc3"><span class="re1">&lt;/rec:Value<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;rec:Value</span> <span class="re0">name</span>=<span class="st0">&quot;OUT_ATT_NAME&quot;</span><span class="re2">&gt;</span></span>Title<span class="sc3"><span class="re1">&lt;/rec:Value<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:Property<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:configuration<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/proc:invokePipelet<span class="re2">&gt;</span></span></span>
<span class="sc3"><span class="re1">&lt;/extensionActivity<span class="re2">&gt;</span></span></span></pre></div>
<a name="Build_and_Test_your_pipelet"></a><h2> <span class="mw-headline"> Build and Test your pipelet </span></h2>
<p>Depending on the SMILA distribution you are using you have different options how to build and test your pipelet:
</p>
<a name="Source_Code_Distribution"></a><h3> <span class="mw-headline"> Source Code Distribution </span></h3>
<p>You can simply integrate your pipelet in the SMILA build process. Refer to the instructions on <a href="../../Development_Guidelines/How_to_integrate_new_bundle_into_build_process.html" class="mw-redirect" title="SMILA/Development Guidelines/How to integrate new bundle into build process">How to integrate a new bundle into build process</a> for details. You can build your SMILA application and run it as usual.
</p><p>In addition to building the SMILA application you can also directly run SMILA within your eclipse IDE. To test your pipelet, you have to include the bundle in the OSGi launch configuration:
</p>
<ul><li> Open <i>Run &gt; Open Run Dialog</i>.
</li><li> In the left window select <i>OSGi Framework &gt; SMILA</i>.
</li><li> In the right window expand <i>Workspace</i> and select <i>org.eclipse.smila.sample.pipelet</i>.
</li><li> Set the <i>Default Auto-Start</i> option to <i>true</i>.
</li><li> Click the <i>Apply</i> button.
</li><li> Launch SMILA by clicking the <i>Run</i> button.
</li></ul>
<a name="Binary_Distribution"></a><h3> <span class="mw-headline"> Binary Distribution </span></h3>
<p>To test your pipelet you have to add it as a plugin to your SMILA installation.
</p>
<ul><li> export your pipelet as a plugin using eclipse IDE wizards. Refer to the instructions on <a href="../../Development_Guidelines/How_to_export_a_bundle.html" class="mw-redirect" title="SMILA/Development Guidelines/How to export a bundle">How to export a bundle</a> for a step by step description.
</li><li> Copy your plugin to the directory <tt>%SMILA_HOME%/plugins</tt>.
</li><li> Add the following XML snippet to the file <tt>%SMILA_HOME%/features/org.eclipse.smila.feature_1.0.0/feature.xml</tt>:
</li></ul>
<p><code lang="XML">
</p>
<pre> &lt;plugin
id="org.eclipse.smila.sample.pipelet"
download-size="0"
install-size="0"
version="1.0.0"
unpack="false"/&gt;
</pre>
<p></code>
</p>
<ul><li> Launch SMILA by starting <tt>SMILA.exe</tt>.
</li></ul>
<p>If SMILA is running, you can start a crawling job as described in <a href="../../Development_Guidelines.1.html#Run_and_manage_the_connectivity_framework" title="SMILA/Development Guidelines">Run and manage the connectivity framework</a> beginning at step 5.
While crawling your data source you can already search for indexed documents. Open your browser, navigate to <a href="http://localhost:8080/SMILA/search" class="external free" title="http://localhost:8080/SMILA/search" rel="nofollow">http://localhost:8080/SMILA/search</a> and execute a query. In the result table take a look at the attribute <b>Title</b>. Every <b>Title</b> should now have the suffix <tt>"modified by HelloWorldPipelet"</tt>, as this was added by the pipelet.
</p>
<a name="Troubleshooting"></a><h3> <span class="mw-headline"> Troubleshooting </span></h3>
<p>If there are any problems please take a look at the log files <tt>SMILA.log</tt> and <tt>/workspace/.metadata/.log</tt> and feel free to ask for support at the <a href="http://www.eclipse.org/smila/newsgroup.php" class="external text" title="http://www.eclipse.org/smila/newsgroup.php" rel="nofollow">SMILA Newsgroup</a>.
</p>
<!--
NewPP limit report
Preprocessor node count: 127/1000000
Post-expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
#ifexist count: 0/100
-->
<!-- Saved in parser cache with key wikidb:pcache:idhash:16093-0!1!0!!en!2!edit=0 and timestamp 20130415190501 -->
<div class="printfooter">
Retrieved from "<a href="How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet.html">http://wiki.eclipse.org/SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet</a>"</div>
<div id="catlinks"><p class='catlinks'><a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories">Category</a>: <span dir='ltr'><a href="http://wiki.eclipse.org/Category:SMILA" title="Category:SMILA">SMILA</a></span></p></div> <!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<!-- Yoink of toolbox for phoenix moved up -->
</div>
</div>
<div id="clearFooter"/>
<div id="footer" >
<ul id="footernav">
<li class="first"><a href="http://www.eclipse.org/">Home</a></li>
<li><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/org/foundation/contact.php">Contact</a></li>
<li><a href="http://wiki.eclipse.org/Eclipsepedia:About" title="Eclipsepedia:About">About Eclipsepedia</a></li>
</ul>
<span id="copyright">Copyright &copy; 2013 The Eclipse Foundation. All Rights Reserved</span>
<p id="footercredit">This page was last modified 17:45, 24 October 2012 by <a href="http://wiki.eclipse.org/User:Andreas.weber.empolis.com" title="User:Andreas.weber.empolis.com">Andreas Weber</a>. Based on work by <a href="http://wiki.eclipse.org/index.php?title=User:Juergen.schumacher.attensity.com&amp;action=edit" class="new" title="User:Juergen.schumacher.attensity.com">Juergen Schumacher</a>, <a href="http://wiki.eclipse.org/index.php?title=User:Daniel.stucky.attensity.com&amp;action=edit" class="new" title="User:Daniel.stucky.attensity.com">Daniel Stucky</a> and <a href="http://wiki.eclipse.org/User:Andreas.schank.attensity.com" title="User:Andreas.schank.attensity.com">A. Schank</a> and <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/How_to_integrate_the_HelloWorld_webservice_as_a_Pipelet&amp;action=credits" title="SMILA/Documentation/HowTo/How to integrate the HelloWorld webservice as a Pipelet">others</a>.</p>
<p id="footerviews">This page has been accessed 5,850 times.</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-910670-4");
pageTracker._trackPageview();
</script>
<!-- <div class="visualClear"></div> -->
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
</div>
<!-- Served in 0.053 secs. --></body></html>