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

<channel>
	<title>Bandos&#039; Arcade &#187; WSO2</title>
	<atom:link href="http://www.nuwanbando.com/tag/wso2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nuwanbando.com</link>
	<description>&#34;It&#039;s not about how it is, but how I see it &#34; - Stranger Than Fiction</description>
	<lastBuildDate>Thu, 02 Feb 2012 08:52:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Events notification (presentation) using WSO2 technologies</title>
		<link>http://www.nuwanbando.com/2012/01/events-notification-using-wso2-technologies/</link>
		<comments>http://www.nuwanbando.com/2012/01/events-notification-using-wso2-technologies/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 15:49:15 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[esb]]></category>
		<category><![CDATA[eventing]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[pub-sub]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=810</guid>
		<description><![CDATA[The post is about creating a dashboard to display event notifications using few of WSO2 Technologies. Requirement : Capture events from an event sender and display it in a dashboard Used Technologies : WSO2 Enterprise Service Bus, WSO2 Application Server, WSO2 Gadget Server Architecture : In brief, events are generated randomly, ESB will act as an event sink, and it [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2012%2F01%2Fevents-notification-using-wso2-technologies%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2012%2F01%2Fevents-notification-using-wso2-technologies%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The post is about creating a dashboard to display event notifications using few of WSO2 Technologies.</p>
<p><span style="text-decoration: underline;">Requirement</span> : Capture events from an event sender and display it in a dashboard</p>
<p><span style="text-decoration: underline;">Used Technologies</span> : <a href="http://wso2.com/products/enterprise-service-bus/" target="_blank">WSO2 Enterprise Service Bus</a>, <a href="http://wso2.com/products/application-server/" target="_blank">WSO2 Application Server</a>, <a href="http://wso2.com/products/gadget-server/" target="_blank">WSO2 Gadget Server</a></p>
<p><span style="text-decoration: underline;">Architecture</span> : In brief, events are generated randomly, ESB will act as an event sink, and it will publish the events to the subscribed parties (to a service deployed in WSO2 AS). There is a gadget deployed in WSO2 Gadget Server where it will poll the received events from the service periodically.</p>
<p style="text-align: center;"><a href="http://www.nuwanbando.com/wp-content/uploads/2012/01/demo-12.png"><img class="aligncenter  wp-image-819" title="demo-12" src="http://www.nuwanbando.com/wp-content/uploads/2012/01/demo-12.png" alt="" width="538" height="425" /></a></p>
<p style="text-align: left;"><span style="text-decoration: underline;">HOWTO</span> :</p>
<p style="text-align: left;"><span style="text-decoration: underline;">The ESB</span></p>
<p style="text-align: left;">At the ESB end we will have to set up the event sink as following,</p>
<p><script src="https://gist.github.com/1653037.js?file=synapse.xml"></script></p>
<p style="text-align: left;">
<p>Then you need to create a topic in the ESB and subscribe the created service. Steps in doing so is documented <a href="http://docs.wso2.com/display/ESB/Sample+1+Introduction+to+Eventing+and+Event+Mediator" target="_blank">here</a></p>
<p><span style="text-decoration: underline;">The Service</span></p>
<p>A very simple service to accumulate the events (this is not at all production grade, who whats to keep all the event in memory <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</p>
<p><script src="https://gist.github.com/1653077.js?file=TrafficEventReceiverService.java"></script></p>
<p><span style="text-decoration: underline;">The Client</span></p>
<p>Its too long to post, you can check it at <a href="https://gist.github.com/1653062">https://gist.github.com/1653062</a></p>
<p>You can run the client like &#8220;<em>ant trafficevent -Dtrpurl=http://localhost:8280 -Devent=traffic.is.crazy</em>&#8221;</p>
<p><span style="text-decoration: underline;">The Gadget</span><br />
<script src="https://gist.github.com/1653079.js?file=TrfficEventGadget.xml"></script><br />
<span style="text-decoration: underline;">In Action</span></p>
<p style="text-align: center;"><a href="http://www.nuwanbando.com/wp-content/uploads/2012/01/gs1.png"><img class="aligncenter  wp-image-823" title="gs" src="http://www.nuwanbando.com/wp-content/uploads/2012/01/gs1.png" alt="" width="565" height="466" /></a></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2012/01/events-notification-using-wso2-technologies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSO2Con is NOT just for &#8220;Hard Core&#8221; Techies</title>
		<link>http://www.nuwanbando.com/2011/09/wso2con-is-not-just-for-hard-core-techies/</link>
		<comments>http://www.nuwanbando.com/2011/09/wso2con-is-not-just-for-hard-core-techies/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 16:53:08 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2Con]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=702</guid>
		<description><![CDATA[Well, maybe I am too late to write this post; but hopefully I will be able to discard a misconception in some of you. As you all know by now WSO2Con starts tomorrow and goes on till Friday (16/09). Its a great tech feast, and there weren&#8217;t many such in recent history in Sri Lanka. [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2011%2F09%2Fwso2con-is-not-just-for-hard-core-techies%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2011%2F09%2Fwso2con-is-not-just-for-hard-core-techies%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Well, maybe I am too late to write this post; but hopefully I will be able to discard a misconception in some of you. As you all know by now <a href="http://wso2.com/events/wso2con-2011-colombo/" target="_blank">WSO2Con</a> starts tomorrow and goes on till Friday (16/09). Its a great tech feast, and there weren&#8217;t many such in recent history in Sri Lanka. Maybe am not the best person to write all the good stuff about it and asking you to take my word. But if I forget the fact that I am a member of wso2 team, and look at it as a Sri Lankan techie, the agenda still sounds pretty awesome.</p>
<p>Yesterday I meat a friend of mine (lets say Bob <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ) at a dinner, and Bob was saying, &#8220;you guys are doing a software conference right; I saw in media, sounds great !!&#8221;. I was head over heels (didnt wona say <a href="http://wso2.com/events/wso2con-2011-colombo/speakers/#nuwan" target="_blank">I am doing a talk</a>; wanted to be bit modest <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) I asked excitedly, &#8220;So are you coming ?&#8221;. But his reply surprised me. He said &#8220;Well I dont think its for us you know. Its too hard core; you guys are doing open source, SOA and cloud stuff. I don&#8217;t think we are there yet&#8221;. If I add little bit of context, Bob is the senior IT manager in a well reputed insurance company in Sri Lanka. So as I felt he had all the reasons to attend to WSO2Con.</p>
<p>I see several misconceptions in his comment, maybe people in Sri Lankan IT services (not directly software, but software is a supporting system like for IT systems for banks) industry are bit behind the game. For one, <a href="http://apsblog.burtongroup.com/2009/01/soa-is-dead-long-live-services.html" target="_blank">some people say SOA and Web Services are dead</a>  <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  it&#8217;s no news neither a buzz, Yes cloud stuff is kinda new, but you have it every where now, I guess its high time to check that out too. But whats so hard core about Open Source ??? !@#$.</p>
<p>So yeah WSO2Con is <span style="text-decoration: underline;"><strong>NOT</strong></span> just for &#8220;Hard Core&#8221; Techies. It certainly feels awesome that people think like that, but the truth is its a week of discussions on software systems. Maybe little bit more about distributed and service oriented systems, But isn&#8217;t everything distributed and service oriented these days ? <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>If you checkout the agenda its mostly about enterprise systems, issues in enterprise systems, how to solve them, how open source software can help and most of all, its a week of discussions on <strong>experience</strong>. Why experience in bold; well if you read the abstracts of many talks, its all about how people solved their enterprise integration problems. It a talk show of first hand experiences. There are, <a href="http://wso2.com/events/wso2con-2011-colombo/speakers" target="_blank">IT consultants, Architects and Visionaries</a> coming from around the world to share there knowledge and experience. What else can you ask for ?</p>
<p>So I guess, if you are a manger who has even a slight influence in IT matters, this is something you goto check out; maybe you do have the same problems as some of these speakers had some time back. It would be a great opportunity to talk to them in person and get some insight.</p>
<p>Well hope I did make some change of your attitude; and I do hope to see you <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><img class="aligncenter" src="http://www.volunteeringeh.com/Tool%20Kit/images/misperception.png" alt="" width="150" height="184" /></p>
<p>FYI you can still register at <a href="http://wso2.com/events/wso2con-2011-colombo/register" target="_blank">wso2con.com </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2011/09/wso2con-is-not-just-for-hard-core-techies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSO2Con 2011; Registration now open</title>
		<link>http://www.nuwanbando.com/2011/08/wso2con-2011-registration-now-open/</link>
		<comments>http://www.nuwanbando.com/2011/08/wso2con-2011-registration-now-open/#comments</comments>
		<pubDate>Wed, 17 Aug 2011 17:41:46 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2Con]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=695</guid>
		<description><![CDATA[Conference at a glance]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2011%2F08%2Fwso2con-2011-registration-now-open%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2011%2F08%2Fwso2con-2011-registration-now-open%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://wso2.com/events/wso2con-2011-colombo/"><img class="alignnone size-full wp-image-696" title="wso2con-ad-02-quarterfpage-v1-01" src="http://www.nuwanbando.com/wp-content/uploads/2011/08/wso2con-ad-02-quarterfpage-v1-01.png" alt="" width="443" height="710" /></a></p>
<h2>Conference at a glance</h2>
<p><img class="alignnone" src="http://a.content.wso2.com/wp-content/themes/wso2ng-v3/con-images/wso2con-2011-conference-at-a-glance.png" alt="" width="670" height="600" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2011/08/wso2con-2011-registration-now-open/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meet me at WSO2Con 2011</title>
		<link>http://www.nuwanbando.com/2011/08/meet-me-at-wso2con-2011/</link>
		<comments>http://www.nuwanbando.com/2011/08/meet-me-at-wso2con-2011/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 13:30:11 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[WSO2Con]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=675</guid>
		<description><![CDATA[WSO2Con 2011 is a technical and IT-Biz conference organized by WSO2 inc, and 2011 is its second consecutive time. Last year the conference concluded grandly and it discussed many technical topics such as enterprise computing, cloud, web services security, enterprise data etc. It concluded with a great panel discussion on the topic &#8220;A Walk Down [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2011%2F08%2Fmeet-me-at-wso2con-2011%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2011%2F08%2Fmeet-me-at-wso2con-2011%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><a href="http://wso2.com/events/wso2con-2011-colombo/" target="_blank">WSO2Con 2011</a> is a technical and IT-Biz conference organized by <a href="http://wso2.com" target="_blank">WSO2 inc</a>, and 2011 is its second consecutive time. Last year the conference concluded grandly and it discussed many technical topics such as enterprise computing, cloud, web services security, enterprise data etc. It concluded with a great panel discussion on the topic &#8220;A Walk Down Memory Lane: XML, Web Services &amp; SOA from 1990 to 2010&#8243; and the panelists were some of the <a href="http://wso2.com/events/wso2con-2010-colombo/abstracts/" target="_blank">renowned personalities</a> in XML Web services space.</p>
<p>So the conference is back this year, and it will be on September 12th to 16th at Waters Edge Colombo, There will be two tutorial sessions (12th and 16th) and the conference will span for three days (13th, 14th and 15th). <a href="http://wso2.com/events/wso2con-2011-colombo/agenda/" target="_blank">The agenda</a> was recently announced officially, and it surely looks interesting. I guess if you are into Distributed Computing, SOA and Cloud this would be the right place to and the event to be apart of.</p>
<p><img class="aligncenter" title="WSO2Conf" src="http://b.content.wso2.com/wp-content/themes/wso2ng-v3/images/wso2con2011-p2-banner.png" alt="WSO2Conf" width="670" height="150" /></p>
<p>Also am quite proud to blog about that I will also be <a href="http://wso2.com/events/wso2con-2011-colombo/speakers#nuwan" target="_blank">one of the speakers</a> in the 2011 conference, The topic I submitted was &#8220;User interfaces in distributed environments&#8221; and later I altered it to &#8220;Users: The SOA Last Mile&#8221; to make it broader.</p>
<p>Main reason for this topic is that I have done some resent work close to the Users of information systems and about delivering information to users effectively and efficiently, I believe I can talk about it, and maybe give some insight about How important the &#8220;Last Mile&#8221; is. Anyhow I don&#8217;t wona write about What I will be talking, coz mainly its still a blank paper for me too <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>So yeah what I wanted to say is that WSO2Con will be happening on September in Colombo, and I have no doubt that it will be one great tech Conf with a great set of talks and workshops, so hope to see you there soon !!!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2011/08/meet-me-at-wso2con-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSO2 Gadget Server 1.3.0 is out with a bunch of awaited features</title>
		<link>http://www.nuwanbando.com/2010/12/wso2-gadget-server-1-3-0/</link>
		<comments>http://www.nuwanbando.com/2010/12/wso2-gadget-server-1-3-0/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 05:38:10 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google gadgets]]></category>
		<category><![CDATA[Shindig]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Carbon]]></category>
		<category><![CDATA[WSO2 Gadget Server]]></category>
		<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=631</guid>
		<description><![CDATA[This is a short post aiming to notify the new features of WSO2 Gadget Server 1.3.0 which was released recently. The product is popular among the community as a gadget rendering platform, which provides a presentation layer for heterogeneous enterprise services based on Google Gadgets Specification and Apache Shindig. As an enterprise presentation product, the [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F12%2Fwso2-gadget-server-1-3-0%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F12%2Fwso2-gadget-server-1-3-0%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>This is a short post aiming to notify the new features of <a href="http://wso2.com/products/gadget-server/" target="_blank">WSO2 Gadget Server 1.3.0</a> which was released recently. The product is popular among the community as a gadget rendering platform, which provides a presentation layer for heterogeneous enterprise services based on <a href="http://code.google.com/apis/gadgets/docs/spec.html" target="_blank">Google Gadgets Specification</a> and <a href="http://shindig.apache.org/" target="_blank">Apache Shindig</a>. As an enterprise presentation product, the Gadget server is now fully fledged with number of awaited features such as,</p>
<p><a href="http://www.nuwanbando.com/wp-content/uploads/2010/12/gs-screen-1.png"><img class="size-full wp-image-641 alignnone" title="gs-screen-1" src="http://www.nuwanbando.com/wp-content/uploads/2010/12/gs-screen-1.png" alt="" /></a></p>
<ul>
<li>Custom Layouts (<a href="http://wso2.org/project/gadget-server/1.3.0/docs/org_portal.html#tabs" target="_blank">1, 2, 3 column customization</a>)</li>
<li>Themeing support (<a href="http://wso2.org/project/gadget-server/1.3.0/docs/org_portal.html#theme" target="_blank">customize the look and feel</a>)</li>
<li>Role based permissions (<a href="http://wso2.org/project/gadget-server/1.3.0/docs/org_portal.html#theme" target="_blank">Now gadgets can be restricted based on user roles</a>)</li>
<li>SOAP request support (<a href="http://wso2.org/project/gadget-server/1.3.0/docs/gadget_authoring.html#SOAP" target="_blank">Gadgets can now perform SOAP web service calls</a>)</li>
<li>Tooling integration with Carbon Studio (<a href="http://wso2.org/project/gadget-server/1.3.0/docs/gadget_archive_deployment.html" target="_blank">gadgets can be deployed as archives created via CStudio</a>)</li>
<li>Integration to WSO2 Visualization framework (WSO2Vis)</li>
</ul>
<p>And some of the important features of WSO2 Gadget Server are,</p>
<ul>
<li>Enterprise Gadget Repository</li>
<li><a href="http://wso2.org/project/gadget-server/1.3.0/docs/gadget_authoring.html#OAuth" target="_blank">OAuth Support</a></li>
<li><a href="http://wso2.org/project/gadget-server/1.3.0/docs/gadget_authoring.html#igc" target="_blank">Inter-Gadget communication</a></li>
<li>i18n Support</li>
<li>WSO2<a href="http://wso2.com/products/carbon" target="_blank"> Carbon platform</a> level support such as,
<ul>
<li>Clustering,</li>
<li>Monitoring</li>
<li>Userstore integration (AD, LDAP)</li>
<li>Registry space</li>
</ul>
</li>
</ul>
<p>Try out The Gadget Server 1.3.0, and provide your feedback to make it better and brighter. You <a href="http://wso2.org/mail" target="_blank">can provide feedback</a>, <a href="https://wso2.org/jira/secure/Dashboard.jspa" target="_blank">report bug</a>s and join in with <a href="http://wso2.org/mailarchive/architecture/" target="_blank">architectural discussions</a> at any of WSO2 public lists and also you can have a better understanding via going through many articles at <a href="http://wso2.org" target="_blank">WSO2 Oxygen tank</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/12/wso2-gadget-server-1-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>{HowTo} WSO2 Carbon Server logs to be stored in a database</title>
		<link>http://www.nuwanbando.com/2010/09/howto-wso2-carbon-server-logs-to-be-stored-in-a-database/</link>
		<comments>http://www.nuwanbando.com/2010/09/howto-wso2-carbon-server-logs-to-be-stored-in-a-database/#comments</comments>
		<pubDate>Sat, 25 Sep 2010 02:32:27 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Log4j]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Carbon]]></category>
		<category><![CDATA[jdbc-appender]]></category>
		<category><![CDATA[log4j]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=585</guid>
		<description><![CDATA[Thought of documenting this for my own reference, hope this will help. I am also planing to make a knowledge base article out of it to be posted in WSO2 Oxygen Tank. As you may know, if your are familiar with Log4j, that the logs created with it, can be stored in a database instead [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F09%2Fhowto-wso2-carbon-server-logs-to-be-stored-in-a-database%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F09%2Fhowto-wso2-carbon-server-logs-to-be-stored-in-a-database%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Thought of documenting this for my own reference, hope this will help. I am also planing to make a knowledge base article out of it to be posted in<a href="http://wso2.org/"> WSO2 Oxygen Tank</a>.</p>
<p>As you may know, if your are familiar with <a href="http://logging.apache.org/log4j/1.2/">Log4j</a>, that the logs created with it, can be stored in a database instead of a file. In order to do that you need to add few configuration values to the log4j.properties file.</p>
<p>In-terms of a WSO2 Carbon based server this properties file resides in CARBON_HOME/lib directory. before adding these configurations there are few steps to visit.</p>
<p>[1] Create database {LOG_DB}<br />
[2] Create the log table  {LOGGING} with the following fields</p>
<pre name="code" class="sql">
create table LOGGING (
             id decimal NOT NULL,
             prio varchar(15),
             cat varchar(255),
             thread varchar(30),
             msg varchar(255),
             layout_msg varchar(255),
             throwable varchar(2000),
             the_timestamp timestamp);
</pre>
<p>[3] Create a user and assign to the DB</p>
<pre name="code" class="sql">
           {user: logger / pwd: logger}
</pre>
<p>[4] Copy jdbcappender.jar to {CARBON_HOME}/lib and {CARBON_HOME}/repository/components/lib along with the database driver</p>
<pre name="code" class="sql">
           {jdbcappender.jar can be found at http://www.dankomannhaupt.de/projects/jdbcappender/lib/jdbcappender.jar}
</pre>
<p>Thats it. All preconditions are set, Now open up the log4j.properties file and add the following appender settings to the end.<br />
<br/></p>
<pre>
#log to db appender
log4j.appender.DB_APPENDER=org.apache.log4j.jdbcplus.JDBCAppender
log4j.appender.DB_APPENDER.url=jdbc:mysql://localhost:3306/LOG_DB
log4j.appender.DB_APPENDER.dbclass=com.mysql.jdbc.Driver
log4j.appender.DB_APPENDER.username=logger
log4j.appender.DB_APPENDER.password=logger
log4j.appender.DB_APPENDER.sql=INSERT INTO LOGGING (id, prio, cat, thread, msg, layout_msg, throwable,
the_timestamp) VALUES (@INC@, '@PRIO@', '@CAT@', '@THREAD@', '@MSG@', '@LAYOUT:1@', '@THROWABLE@', '@TIMESTAMP@')
log4j.appender.DB_APPENDER.layout=org.apache.log4j.PatternLayout</pre>
<p>Scroll to <em>log4j.rootLogger</em> and add the appender to the list,<br />
<br/></p>
<pre>log4j.rootLogger=ERROR, CARBON_CONSOLE, CARBON_LOGFILE, CARBON_MEMORY, CARBON_SYS_LOG, DB_APPENDER</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/09/howto-wso2-carbon-server-logs-to-be-stored-in-a-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gadgets On the Cloud</title>
		<link>http://www.nuwanbando.com/2010/06/gadgets-on-the-cloud/</link>
		<comments>http://www.nuwanbando.com/2010/06/gadgets-on-the-cloud/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 06:11:10 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[PaaS]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Gadget Server]]></category>
		<category><![CDATA[WSO2 Mashup Server]]></category>
		<category><![CDATA[WSO2 Stratos]]></category>
		<category><![CDATA[Gadgets]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=498</guid>
		<description><![CDATA[There is no doubt that JavaScript/XML gadgets make a great presentation layer over the web with increasing amount of data floating around. The ability of which these gadgets can be embedded in any place over the web, provides a great flexibility, and a wider reach. Google does this quite nicely with their iGoogle gadgets, enabling [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fgadgets-on-the-cloud%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fgadgets-on-the-cloud%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>There is no doubt that <a href="http://code.google.com/apis/gadgets/docs/reference.html">JavaScript/XML gadgets</a> make a great presentation layer over the web with increasing amount of data floating around. The ability of which these gadgets can be embedded in any place over the web, provides a great flexibility, and a wider reach. Google does this quite nicely with their iGoogle gadgets, enabling the <a href="http://www.google.com/webmasters/gadgets/" target="_blank">gadgets to be embedded</a> in almost any web page. The success of this great idea, would be only logical if all the data, services and mashups are also available over the web with open access or maybe authenticated access. This is where a cloud story fits-in, and this the very reason why Google can do it quite easily.</p>
<p><a href="http://www.nuwanbando.com/wp-content/uploads/2010/06/stratos_logo_h42.gif"><img class="size-full  wp-image-508   alignnone" title="stratos_logo_h42" src="http://www.nuwanbando.com/wp-content/uploads/2010/06/stratos_logo_h42.gif" alt="" width="193" height="42" /></a><a href="http://www.nuwanbando.com/wp-content/uploads/2010/06/cloud-gadget.png"><img class="size-full wp-image-509 alignnone" title="cloud-gadget" src="http://www.nuwanbando.com/wp-content/uploads/2010/06/cloud-gadget.png" alt="" width="290" height="48" /></a></p>
<p>However, what if you want to do everything from the scratch and also provide a great presentation layer for the users. For an instance, lets say you have a lot of financial data within your enterprise, and you need to provide some of these to your customers, to general public and some for your employees. To do this, you will have to create appropriate data services, maybe mediate or transform some data, integrate with some legacy data sources, create some business work flows, mashup them with some 3rd party services like <a href="http://code.google.com/apis/finance/">Google finance</a> or <a href="http://code.google.com/apis/charttools/">charts</a> and finally expose the end results to the targeted user group. This is where <a href="http://wso2.com/cloud/stratos/">WSO2 Stratos PaaS</a> comes for your rescue <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>If your requirements are such, you will need a strong middle-ware platform to full fill all the above tasks, and if its all on the cloud, you will not have to worry about anything other than writing your business logic. Once the business logic is correctly compiled, you can <a href="https://mashup.cloud.wso2.com/carbon/admin/login.jsp">Mashup</a> some of your data with external service APIs, and then write the presentation logic purely on javascript and xml as XML Gadgets and expose them to the users you need. Once the gadgets are published on <a href="https://gadget.cloud.wso2.com" target="_blank">WSO2 Cloud Gadget Server</a> its just a matter of linking them up in any web page you want over the web.<br />
<center><br />
<iframe src ="https://gadget.cloud.wso2.com/ifr?container=default&#038;mid=3&#038;nocache=1&#038;country=US&#038;lang=en&#038;view=default&#038;parent=https%3A%2F%2Fgadget.cloud.wso2.com%2F&#038;debug=1&#038;up_=undefined&#038;st=john.doe%3Ajohn.doe%3A10717%3Ashindig%3Ahttp%253A//gadget.cloud.wso2.com%253A80/registry/resource/_system/config/repository/gadget-server/gadgets/ngeo_vid.xml%3A0%3Adefault&#038;url=http%3A%2F%2Fgadget.cloud.wso2.com%3A80%2Fregistry%2Fresource%2F_system%2Fconfig%2Frepository%2Fgadget-server%2Fgadgets%2Fngeo_vid.xml#rpctoken=1304649864" style="width:400px; height:248px; padding: 10px;"></p>
<p>Your browser does not support iframes.</p>
<p></iframe><iframe src ="https://gadget.cloud.wso2.com/ifr?container=default&#038;mid=0&#038;nocache=1&#038;country=US&#038;lang=en&#038;view=default&#038;parent=https%3A%2F%2Fgadget.cloud.wso2.com%2F&#038;debug=1&#038;up_=undefined&#038;st=john.doe%3Ajohn.doe%3A10197%3Ashindig%3Ahttp%253A//gadget.cloud.wso2.com%253A80/registry/resource/_system/config/repository/gadget-server/gadgets/soa.xml%3A0%3Adefault&#038;url=http%3A%2F%2Fgadget.cloud.wso2.com%3A80%2Fregistry%2Fresource%2F_system%2Fconfig%2Frepository%2Fgadget-server%2Fgadgets%2Fsoa.xml#rpctoken=1304649864" style="width:400px; height:248px; padding: 10px; margin-left: 10px;"></p>
<p>Your browser does not support iframes.</p>
<p></iframe><br />
</center><br />
The above two gadgets are taken from WSO2 Cloud Gadget Server and have linked in to this blog, to convince about the great flexibility and reach it can add-up. You do not need to use the <a href="https://gadget.cloud.wso2.com/portal" target="_blank">Cloud Gadget Portal</a> as the only place for your data to be presented (Of cause if you are not using other gadget server specific privileges such as<a href="http://wso2.org/library/articles/2010/03/wso2-gadget-server-inter-gadget-communication-pubsub" target="_blank"> inter-gadget communication</a> etc). You can simply use the Gadget Server as your own gadget repository, and encourage users to discover the gadgets and embed them into their own web pages over the web.</p>
<p>To sum up the story I would say, try-out <a href="https://cloud.wso2.com" target="_blank">Stratos</a>, try out the available services and you will definitely find out more use cases, and creative ways to use the platform and leverage the advantages of the cloud</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/06/gadgets-on-the-cloud/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WSO2 Stratos &#8211; A true cloud story</title>
		<link>http://www.nuwanbando.com/2010/06/wso2-stratos-a-true-cloud-story/</link>
		<comments>http://www.nuwanbando.com/2010/06/wso2-stratos-a-true-cloud-story/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 08:37:15 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Cloud]]></category>
		<category><![CDATA[FOSS]]></category>
		<category><![CDATA[PaaS]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Stratos]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=479</guid>
		<description><![CDATA[Stratos Services Yesterday (1st of June), A little over a 12 developer team at WSO2, took a great middle-ware platform in to the cloud. It&#8217;s not just putting all our server products on an EC2 instance, but embedding all cloud-native features into them. The PaaS (Platform as a Service) is named as WSO2 Stratos, which [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fwso2-stratos-a-true-cloud-story%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F06%2Fwso2-stratos-a-true-cloud-story%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div class="mceTemp">
<dl id="attachment_492" class="wp-caption alignleft" style="width: 306px;">
<dt class="wp-caption-dt"><a href="http://www.nuwanbando.com/wp-content/uploads/2010/06/products1.png"><img class="size-full wp-image-492" title="products" src="http://www.nuwanbando.com/wp-content/uploads/2010/06/products1.png" alt="" width="296" height="354" /></a></dt>
<dd class="wp-caption-dd">Stratos  Services</dd>
</dl>
</div>
<p>Yesterday (1st of June), A little over a 12 developer team at WSO2, <a href="http://samisa-abeysinghe.blogspot.com/2010/06/six-weeks-and-12-people-magic.html">took a great middle-ware platform in to the cloud</a>. It&#8217;s not just putting all our server products on an EC2 instance, but embedding all <a href="http://pzf.fremantle.org/2010/05/cloud-native.html">cloud-native</a> features into them. The <a href="http://en.wikipedia.org/wiki/Platform_as_a_service">PaaS</a> (Platform as a Service) is named as WSO2 Stratos, which is based on award winning WSO2 Carbon middle-ware platform. As the Alpha-1 release, Stratos offers number of WSO2 products integrated, namely <a href="http://wso2.com/products/governance-registry">Governance Registry (GREG)</a>, <a href="http://wso2.com/products/identity-server">Identity Server (IS)</a>, <a href="http://wso2.com/products/business-activity-monitor">Business Activity Monitor (BAM)</a>, <a href="http://wso2.com/products/mashup-server">Mashup Server (MS)</a> and <a href="http://wso2.com/products/gadget-server">WSO2 Gadget Server (GS)</a>.</p>
<p>Stratos is also offered as a downloadable version for the private cloud within your enterprise. If you are quite serious about using SOA for your enterprise and do not need to worry about deployment, scalability and server maintenance, Stratos would be the ideal solution for you.</p>
<p><img class="alignnone" src="http://lh6.ggpht.com/_Ni8BgaCmQow/TAUt8ch38JI/AAAAAAAAAUg/C1TTIWkAvco/%5BUNSET%5D.png?imgmax=800" alt="" width="193" height="42" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/06/wso2-stratos-a-true-cloud-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Scraping &amp; Parsing HTML to XML in Javascript</title>
		<link>http://www.nuwanbando.com/2010/04/web-scraping-parsing-html-to-xml-in-javascript/</link>
		<comments>http://www.nuwanbando.com/2010/04/web-scraping-parsing-html-to-xml-in-javascript/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 19:55:50 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Google gadgets]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Gadget Server]]></category>
		<category><![CDATA[WSO2 Mashup Server]]></category>
		<category><![CDATA[Mashup]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=412</guid>
		<description><![CDATA[Today I was working on a customer POC and happened to create few Google gadgets to visualize selected data sets from *.gov.uk sites. The scenario which is implemented was, mixed with inter-gadget communication and content search over data.gov.uk sites. I created three simple gadgets which communicates with each other, and one acted as the controlling [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fweb-scraping-parsing-html-to-xml-in-javascript%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fweb-scraping-parsing-html-to-xml-in-javascript%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Today I was working on a customer POC and happened to create few <a href="http://code.google.com/apis/gadgets/">Google gadgets</a> to visualize selected data sets from *.gov.uk sites. The scenario which is implemented was, mixed with inter-gadget communication and content search over data.gov.uk sites. I created three simple gadgets which communicates with each other, and one acted as the controlling gadget which pushed the search parameters to other two gadgets. The two content gadgets showed UK (1) primary school information and (2) electoral information. The pushed parameter was the postal code of different parts of UK. The <a href="http://www.direct.gov.uk/en/index.htm" target="_blank">direct.gov.uk</a> has a form based implementation of this.</p>
<p><a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/Screenshot.png"><img class="size-medium wp-image-413 alignleft" title="Screenshot" src="http://www.nuwanbando.com/wp-content/uploads/2010/04/Screenshot-241x300.png" alt="" width="241" height="300" /></a></p>
<p>The Requirements for the POC was, simple and we already had working samples of <a href="http://wso2.org/library/articles/2010/03/wso2-gadget-server-inter-gadget-communication-pubsub" target="_blank">such a scenario</a> at WSO2 library.</p>
<ol>
<li>Show how one gadget can pass the context to other gadgets</li>
<li>How gadgets can harvest data in various formats (in my previous post I explained on how to get data from RDF endpoints, which are also available in *.gov.uk sites)</li>
</ol>
<p>The building blocks for the implementation was the search url, which was quite straight forward. for all the requests based on postal codes the direct.gov site served in the same manner (because of this important fact, the automation process became trivial). for an instance the url for primary school information retrial was,</p>
<p><a href="http://local.direct.gov.uk/LDGRedirect/LocationSearch.do?LGSL=13&amp;searchtype=1&amp;LGIL=8&amp;Style=&amp;formsub=t&amp;text=SE1+7DU" target="_blank">http://local.direct.gov.uk/LDGRedirect/LocationSearch.do?LGSL=13&amp;searchtype=1&amp;LGIL=8&amp;Style=&amp;formsub=t&amp;text=<strong>SE1+7DU</strong></a></p>
<p>Where the param &#8220;text&#8221; changed according to the postal code. So far everything seemed straight forward, however at implementation, while using <a href="http://code.google.com/apis/gadgets/docs/dev_guide.html">Gadgets API</a> for content retrial, I faced problems in parsing text with javascript. Hence the <a href="http://code.google.com/apis/opensocial/docs/0.7/reference/gadgets.io.html#makeRequest" target="_blank">gadgets.io.makeRequest </a>supported HTML as text and the API method returned the retrieved HTML document as string making it quite impossible to process.</p>
<p>With some thinking and advise, I brought the <a href="http://wso2.com/products/mashup-server/">Mashup Server</a> in to the picture and used it to retrieve the data from the gov site and returned the result in XML format. Using the Mashup Server web scraping seems to be a piece of cake, We created a simple mashup using the scraper host-object and captured the result set in the search result page. The mashup code as follows,</p>
<pre class="js" name="code">
function search(searchUrl) {
	var scraper = new Scraper(
		<config>
		    <var-def name="url">{searchUrl}</var-def>
			<var-def name="response">
			    <xpath expression="//div[@id='bodyContent']//ul[@class='resultsList']/li/a">
				<html-to-xml>
				   <http method='get' url='${url}'/>
				</html-to-xml>
			     </xpath>
			</var-def>
		</config>
	);
	return new XMLList(scraper.response);
}
</pre>
<p>And finally the two gadgets were making service calls to the mashup service and retrieved the data as an XML object, making the data processing painless. The final version at the Gadget Server looked quite appealing.</p>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 829px"><a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/gs.png"><img class="size-large wp-image-427 " title="gs" src="http://www.nuwanbando.com/wp-content/uploads/2010/04/gs-1024x509.png" alt="WSO2 Gadget Server with UK gov data" width="819" height="407" /></a><p class="wp-caption-text">Gadget Server look - in the end</p></div>
<p>Special thanks goes to <a href="http://ruchirawageesha.blogspot.com/">Ruchira</a> for helping me out with the mashup service <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You can <a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/wso2gs-samples.zip">download</a> the Gadget code and the Mashup service and try the scenario yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/04/web-scraping-parsing-html-to-xml-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mashing up RDF data with WSO2 Mashup Server</title>
		<link>http://www.nuwanbando.com/2010/04/mashing-up-rdf-data-with-wso2-mashup-server/</link>
		<comments>http://www.nuwanbando.com/2010/04/mashing-up-rdf-data-with-wso2-mashup-server/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 20:27:21 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[RDF]]></category>
		<category><![CDATA[Semantic web]]></category>
		<category><![CDATA[SOA]]></category>
		<category><![CDATA[SPARQL]]></category>
		<category><![CDATA[WSO2]]></category>
		<category><![CDATA[WSO2 Gadget Server]]></category>
		<category><![CDATA[Mashup]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[WSO2 Mashup Server]]></category>

		<guid isPermaLink="false">http://www.nuwanbando.com/?p=341</guid>
		<description><![CDATA[Okey so this is the fun part that I promised to write about . I managed to cook up a use-case to demonstrate RDF querying and making use of the semantic data. The data that I am using for querying, is the rdf data sources available in the UK data.gov site. With some analysis I [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fmashing-up-rdf-data-with-wso2-mashup-server%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2010%2F04%2Fmashing-up-rdf-data-with-wso2-mashup-server%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Okey so this is the fun part that I promised to write about <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . I managed to cook up a use-case to demonstrate RDF querying and making use of the semantic data. The data that I am using for querying, is the rdf data sources available in the UK data.gov site. With some analysis I figured out that this task can be fundamentally archived using the combination of Mashup and Gadget Technologies. My choice of tools were <a href="http://wso2.com/products/mashup-server/">WSO2 Mashup Server</a> and <a href="http://wso2.com/products/gadget-server/">WSO2 Gadget Server</a> for their great flexibility and of cause for other obvious reasons <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . However the Mashup Server does not natively support RDF data retrieval, hence I had to do some work to get such functionality integrated. The great fact about the mashup server is its extensibility, the <a href="http://en.wikipedia.org/wiki/WSO2_Mashup_Server">concept of host objects</a> and the ability to write custom host objects and its pluggable nature comes handy in such cases. The high level architecture of what I am trying to achieve is as follows.</p>
<div id="attachment_348" class="wp-caption aligncenter" style="width: 850px"><a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/rdf.png"><img class="size-full wp-image-348" style="background-color: #ffffff;" title="rdf" src="http://www.nuwanbando.com/wp-content/uploads/2010/04/rdf.png" alt="" width="840" height="262" /></a><p class="wp-caption-text">RDF data retrival with WSO2 Mashup server / WSO2 Gadget Server</p></div>
<p style="text-align: left;">To implement the above architecture with the tools at hand I created a <a href="http://wso2.org/library/tutorials/writing-custom-hostobjectttp://" target="_blank">custom host object</a> that can be plugged to the Mashup Server. When dealing with semantic web related tasks and RDF data handling HP&#8217;s <a href="http://jena.sourceforge.net/" target="_blank">Jena</a> java library comes in handy. With the use of <a href="http://openjena.org/ARQ/">Jena-ARQ</a> (for <a href="http://en.wikipedia.org/wiki/SPARQL" target="_blank">SPARQL</a>) api I managed to get the host object working with few lines of code.</p>
<p style="text-align: left;">
<pre name="code" class="java">.....
            Dataset dataSet = DatasetFactory.create(sparqlObject.rdfDataSource);
            // Create a new query form a given user query
            String queryString = sparqlObject.spaqrlQuery;
            Query query = QueryFactory.create(queryString);
            QueryExecution qe = QueryExecutionFactory.create(query, dataSet);
            ResultSet results = qe.execSelect();
.....
           resultString = ResultSetFormatter.asXMLString(results);
..... OR.....
           ByteArrayOutputStream bos = new ByteArrayOutputStream();
           ResultSetFormatter.outputAsJSON(bos, results);
</pre>
<p style="text-align: left;">With the host object in place, the next task was to create a Mashup in-order to query the rdf data with a given source (EndPoint or data source). The javascript service (Mashup) is created to serve this purpose, where the consumer can specify the RDF endpoint or the data source with the SPARQL query and retrieve the dataset in XML or JSON.</p>
<pre name="code" class="js">.....
function RdfDocQueryService(rdfDataSource, rdfQuery, resultType) {
   var sparqlObj = new SparqlHostObject();
   sparqlObj.rdfDataSource = rdfDataSource;
   sparqlObj.spaqrlQuery = rdfQuery;
   sparqlObj.resultType = resultType;
   return new XML(sparqlObj.getDataFromRdfSource());
}
</pre>
<p>Finally to bind everything together, lets try querying some data. My example usecase is to use the query at <a href="http://blogs.talis.com/n2/archives/836" target="_blank">N2 blog</a> to retrieve traffic monitoring points in UK roads. The query to retrieve the data set as follows,</p>
<pre name="code" class="sql">#List the uri, latitude and longitude for road traffic monitoring points on the M5
PREFIX road:
PREFIX rdf:
PREFIX geo:
PREFIX wgs84:
PREFIX xsd:
SELECT ?point ?lat ?long WHERE {
  ?x a road:Road.
  ?x road:number "A4"^^xsd:NCName.
  ?x geo:point ?point.
  ?point wgs84:lat ?lat.
  ?point wgs84:long ?long.
}
</pre>
<p>To visualize these points I have created a gadget with the aid of Google Maps api. This gadget can be hosted in the Gadget Server, where it can dynamically retrieve traffic monitoring points for each road in the UK and display them in the map as follows.</p>
<p style="text-align: center;">
<div id="attachment_362" class="wp-caption aligncenter" style="width: 841px"><a href="http://www.nuwanbando.com/wp-content/uploads/2010/04/WSO2-Gadget-Server_1271189245784.png"><img class="size-full wp-image-362" title="WSO2 Gadget Server_1271189245784" src="http://www.nuwanbando.com/wp-content/uploads/2010/04/WSO2-Gadget-Server_1271189245784.png" alt="" width="831" height="414" /></a><p class="wp-caption-text">Traffic points in A4 road, UK</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2010/04/mashing-up-rdf-data-with-wso2-mashup-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

