apache-tuscany/sca-java-1.x/trunk/demos/alert-aggregator-webapp
2010-10-25 21:39:01 +00:00
..
src Update 1.x trunk version to 1.7-SNAPSHOT 2009-12-21 12:31:56 +00:00
alert-aggregator.png Moving 1.x trunk 2009-11-13 01:42:27 +00:00
alert-aggregator.svg Moving 1.x trunk 2009-11-13 01:42:27 +00:00
build-dojo.xml TUSCANY-3449: Merge r903639 and r904353 from 1.6 branch 2010-10-25 21:39:01 +00:00
build.xml TUSCANY-3449: Merge r903639 and r904353 from 1.6 branch 2010-10-25 21:39:01 +00:00
pom.xml Merge r1000878 Delete temporary dojo directory after maven packaging 2010-10-25 14:40:35 +00:00
README Merge r1000963 Fix typos and add maven build information 2010-10-25 14:52:26 +00:00

Apache Tuscany Alert Aggregator Demo
====================================

The alert aggregator demo provides an application, implemented using SCA, that 
aggregates feeds together and exposes them using the following bindings: 

binding.ws
binding.jsonrpc
binding.feed

The easiest way to get going is to build the demo

cd alert-aggregator-webapp
ant package

This will build a war file 

demo-alert-aggregator-webapp.war

This war can be deployed to your web application container and tested (the war
has been tested with Tomcat 6.0.10). 

The Web Application
-------------------

Once deployed point your browser at 

http://localhost:8080/demo-alert-aggregator-webapp

Taking care to ensure the host name and port number match your local 
configuration. 

This launches a Javascript application in the browser that uses JSONRPC
to contact the server and retrieve a list of alert sources and alerts that
these sources are providing.

The default sources that you see are stored in the following file:

demo-alert-aggregator-webapp/WEB-INF/classes/sources.xml

This file has the following contents:

<ns0:Config xmlns:ns0="http://tuscany.apache.org/sca/demos/aggregator/types">
<ns0:Source Id="0" FeedType="rss">
  <ns0:Name>BBC News</ns0:Name>
  <ns0:Address>http://news.bbc.co.uk/</ns0:Address>
  <ns0:LastChecked>10-Jun-2007 16:34:03</ns0:LastChecked>
  <ns0:FeedAddress>http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml</ns0:FeedAddress>
</ns0:Source>
<ns0:Source Id="1" FeedType="rss">
  <ns0:Name>Engadget</ns0:Name>
  <ns0:Address>http://www.engadget.com</ns0:Address>
  <ns0:LastChecked>10-Jun-2007 16:34:03</ns0:LastChecked>
  <ns0:FeedAddress>http://www.engadget.com/rss.xml</ns0:FeedAddress>
</ns0:Source>
</ns0:Config>

You may want to adjust the "LastChecked" values to change the number of
alerts that are displayed in the first instance.

Using A Feed Reader
-------------------

As this SCA application also uses the binding.feed binding you can use your
favourite feed reader to read the aggregated alerts. To do this point your
feed reader at

http://localhost:8080/demo-alert-aggregator-webapp/services/AlertsFeedServiceRSS

Again taking care to ensure that the host name and port number match you 
local configuration.

Using Web Services
------------------

The SCA application also uses binding.ws to provide a SOAP/HTTP interface. 
The demo client that uses this interface is not yet available. 

Building The Sample Using Ant
-----------------------------

With the binary distribution the sample can be built using Ant as follows:

cd alert-aggregator-webapp
ant package

Building The Sample Using Maven
-------------------------------

With the source and binary distributions the sample can be built using Maven
as follows:

cd alert-aggregator-webapp
mvn

The Maven build runs an integration test after building the war file.