<?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>spiros.blog() &#187; Web Services</title>
	<atom:link href="http://www.tzavellas.com/techblog/tag/web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tzavellas.com/techblog</link>
	<description>Spiros Tzavellas’s blog, mostly on software development and Java.</description>
	<lastBuildDate>Sun, 22 Aug 2010 20:25:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Gigavox Audio Lite and Amazon&#8217;s web services</title>
		<link>http://www.tzavellas.com/techblog/2007/02/18/gigavox-audio-lite-and-amazons-web-services/</link>
		<comments>http://www.tzavellas.com/techblog/2007/02/18/gigavox-audio-lite-and-amazons-web-services/#comments</comments>
		<pubDate>Sun, 18 Feb 2007 16:58:10 +0000</pubDate>
		<dc:creator>spiros</dc:creator>
				<category><![CDATA[Architecture]]></category>
		<category><![CDATA[AWS]]></category>
		<category><![CDATA[Cloud]]></category>
		<category><![CDATA[Clustering]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.tzavellas.com/techblog/?p=78</guid>
		<description><![CDATA[The Technometria podcast, at ITConversations, has a great episode discussing the architecture of the new Gigavox Audio Lite service. Gigavox Audio Lite is currently in alpha and it is the next generation podcasting platform of Gigavox corporation based on the technology behind ITConversations. Gigavox&#8216;s engineers made the decision to leverage Amazon&#8216;s infrastructural web services in [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.itconversations.com/series/technometria.html">Technometria</a> podcast, at <a href="http://www.itconversations.com">ITConversations</a>, has a great <a href="http://www.itconversations.com/shows/detail1728.html">episode</a> discussing the architecture of the new <a href="http://www.gigavox.com">Gigavox</a> Audio Lite service. <a href="http://www.gigavox.com">Gigavox</a> Audio Lite is currently in alpha and it is the next generation podcasting platform of <a href="http://www.gigavox.com">Gigavox</a> corporation based on the technology behind <a href="http://www.itconversations.com">ITConversations</a>.</p>
<p><a href="http://www.gigavox.com">Gigavox</a>&#8216;s engineers made the decision to leverage <a href="http://www.amazon.com">Amazon</a>&#8216;s infrastructural <a href="http://www.amazon.com/gp/browse.html?node=3435361">web services</a> in order to save time and money with <a href="http://www.amazon.com">Amazon</a>&#8216;s <em>pay per use</em> pricing model. <a href="http://www.gigavox.com">Gigavox</a>&#8216;s case is interesting because they use most of <a href="http://www.amazon.com">Amazon</a>&#8216;s infrastructural web services and you can see how you can combine the various services to build a complex application. They use <a href="http://www.amazon.com/S3-AWS-home-page-Money/b/ref=sc_fe_l_2/105-3758940-8842860?ie=UTF8&#038;node=16427261&#038;no=3435361&#038;me=A36L942TSJ2AJA">S3</a> for storage, <a href="http://www.amazon.com/b/ref=sc_fe_l_2/105-3758940-8842860?ie=UTF8&#038;node=201590011&#038;no=3435361&#038;me=A36L942TSJ2AJA">EC2</a> for batch processing and <a href="http://www.amazon.com/Simple-Queue-Service-home-page/b/ref=sc_fe_l_2/105-3758940-8842860?ie=UTF8&#038;node=13584001&#038;no=3435361&#038;me=A36L942TSJ2AJA">SQS</a> to connect the the various subsystems. You can see a diagram of the architecture <a href="http://www.blogarithms.com/index.php/archives/2007/02/03/amazon-for-infrastructure-on-demand/">here</a>.</p>
<p>The <a href="http://www.itconversations.com/shows/detail1728.html">episode</a> has two guests, <a href="http://www.jeff-barr.com">Jeff Barr</a> from <a href="http://www.amazon.com">Amazon</a> and <a href="http://www.blogarithms.com">Doug Kaye</a> from <a href="http://www.gigavox.com">Gigavox</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzavellas.com/techblog/2007/02/18/gigavox-audio-lite-and-amazons-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data in the SOA world</title>
		<link>http://www.tzavellas.com/techblog/2005/11/30/data-in-the-soa-world/</link>
		<comments>http://www.tzavellas.com/techblog/2005/11/30/data-in-the-soa-world/#comments</comments>
		<pubDate>Wed, 30 Nov 2005 00:25:45 +0000</pubDate>
		<dc:creator>spiros</dc:creator>
				<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.tzavellas.com/techblog/?p=34</guid>
		<description><![CDATA[I recently read “Data on the Outside vs. Data on the Inside” by Pat Helland and I have to say that it is one of the best articles I&#8217;ve read so far on service orientation. The article discusses data in a service oriented world. It distinguishes data that exists inside the service (private service implementation [...]]]></description>
			<content:encoded><![CDATA[<p>I recently read <a href="http://msdn.microsoft.com/library/en-us/dnbda/html/dataoutsideinside.asp"><em>“Data on the Outside vs. Data on the Inside”</em></a> by <a href="http://www.pathelland.com">Pat Helland</a> and I have to say that it is one of the best articles I&#8217;ve read so far on service orientation.</p>
<p>The article discusses data in a service oriented world. It distinguishes data that exists inside the service (private service implementation data) from data that exists outside of the service boundaries (data transferred between services) and talks in depth about the characteristics of each type of data.</p>
<p>BTW You can also see <a href="http://www.pathelland.com">Pat Helland</a> talking about SOA in <a href="http://www.theserverside.net/news/thread.tss?thread_id=23801">this</a> <a href="http://www.theserverside.net">TSS.net</a> interview.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzavellas.com/techblog/2005/11/30/data-in-the-soa-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introductory Globus tutorial</title>
		<link>http://www.tzavellas.com/techblog/2005/09/14/introductory-globus-tutorial/</link>
		<comments>http://www.tzavellas.com/techblog/2005/09/14/introductory-globus-tutorial/#comments</comments>
		<pubDate>Wed, 14 Sep 2005 20:42:24 +0000</pubDate>
		<dc:creator>spiros</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Distributed]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.tzavellas.com/techblog/?p=19</guid>
		<description><![CDATA[IBM developerWorks has a very good introductory hands-on tutorial on GRID computing and the Globus toolkit. The title of the tutorial is &#8220;Grid-enable an existing Java technology application&#8221; and it is written by Nicholas Chase. It is nice to see a tutorial on GRID computing that actually tells you how to implement something&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://www-130.ibm.com/developerworks/">IBM developerWorks</a> has a very good introductory hands-on tutorial on <a href="http://www-130.ibm.com/developerworks/grid/">GRID</a> computing and the <a href="http://www.globus.org/toolkit/">Globus</a> toolkit. The title of the tutorial is <a href="https://www6.software.ibm.com/developerworks/education/gr-javagrid/index.html">&#8220;Grid-enable an existing Java technology application&#8221;</a> and it is written by <a href="http://nicholaschase.com">Nicholas Chase</a>.</p>
<p>It is nice to see a tutorial on <a href="http://www-130.ibm.com/developerworks/grid/">GRID</a> computing that actually tells you how to implement something&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzavellas.com/techblog/2005/09/14/introductory-globus-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Contract-First Service Development</title>
		<link>http://www.tzavellas.com/techblog/2005/07/31/contract-first-service-development/</link>
		<comments>http://www.tzavellas.com/techblog/2005/07/31/contract-first-service-development/#comments</comments>
		<pubDate>Sun, 31 Jul 2005 19:25:51 +0000</pubDate>
		<dc:creator>spiros</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.tzavellas.com/techblog/?p=18</guid>
		<description><![CDATA[Aaron Skonnard has written two very interesting articles (article 1, article 2) on contract-first (web) service development. The articles refer to .Net and the ASMX web services toolkit. WSDL-first (where the developer writes the WSDL first, then generates stubs and implements the code of the service using the generated stubs) is the most pure way [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pluralsight.com/blogs/aaron/">Aaron Skonnard</a> has written two very interesting articles (<a href="http://msdn.microsoft.com/msdnmag/issues/05/05/ServiceStation/">article 1</a>, <a href="http://msdn.microsoft.com/msdnmag/issues/05/06/ServiceStation/">article 2</a>) on contract-first (web) service development. The articles refer to <a href="http://www.microsoft.com/net/">.Net</a> and the ASMX web services toolkit.</p>
<p>WSDL-first (where the developer writes the <a href="http://www.w3.org/TR/wsdl">WSDL</a> first, then generates stubs and implements the code of the service using the generated stubs) is the most pure way of web service development since the developer concentrates on the format of messages and on message exchange patterns. Also WSDL-first is the best way to achieve interoperability. Unfortunately it is not usually the most productive. This is because both <a href="http://www.w3.org/TR/wsdl">WSDL</a> and <a href="http://www.w3.org/TR/xmlschema-1/">XSD</a> are complex standards and are hard to write manually.</p>
<p>WSDL-first is not the only way to do contract-first service development. You can create an interface, produce the WSDL from that interface and never change it (keep it immutable). This way the <a href="http://www.w3.org/TR/wsdl">WSDL</a> produced will always be the same and you get away with the versioning problems. You can change the implementation of the service by changing the class that implements the exposed service interface without changing the interface.</p>
<p>Similar techniques are used in object oriented system where in some languages, like Java, changing an interface breaks binary compatibility (see <a href="http://eclipse.org/eclipse/development/java-api-evolution.html">Evolving Java-based APIs</a>). In these cases techniques like <a href="http://www.artima.com/lejava/articles/designprinciples.html">numbered interfaces</a> are used to overcome this limitation.</p>
<p>The major benefit from this approach is productivity. Coding interfaces in statically typed programming languages is easy and when you specify the web service related metadata with annotations you can create a web service very quickly.</p>
<p>This way is used by Steve Swartz in his <a href="http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20050407INDIGOSS/manifest.xml">“Introduction to Indigo”</a> <a href="http://msdn.microsoft.com/msdntv/archive.aspx">MSDNTV</a> episode to develop a simple web service using <a href="http://msdn.microsoft.com/webservices/indigo/">Indigo</a>. In <a href="http://java.sun.com">Java</a> we have JSR-181 web service annotations that can be used to expose classes and interfaces as web services. You can find a stable JSR-181 implementation at<a href="http://incubator.apache.org/beehive/"> Apache Beehive</a>.</p>
<p>Below I implement the web service that Steve Swartz implemented in <a href="http://msdn.microsoft.com/msdntv/episode.aspx?xml=episodes/en/20050407INDIGOSS/manifest.xml">“Introduction to Indigo”</a> MSDNTV episode in <a href="http://java.sun.com">Java</a> with JSR-181 annotations.</p>
<p>Define an endpoint with an interface + annotations:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.jws.WebMethod</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.jws.WebService</span><span style="color: #339933;">;</span>
&nbsp;
@WebService<span style="color: #009900;">&#40;</span>
        serviceName<span style="color: #339933;">=&amp;</span>quot<span style="color: #339933;">;</span>IMyService<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span>,
        targetNamespace<span style="color: #339933;">=&amp;</span>quot<span style="color: #339933;">;</span>uuid<span style="color: #339933;">:</span><span style="color: #cc66cc;">12341234</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1234</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1234</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1234</span><span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span>
<span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">interface</span> IMyService <span style="color: #009900;">&#123;</span>
&nbsp;
        @WebMethod
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> mangle<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> s<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>and then implement the interface:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javax.jws.WebService</span><span style="color: #339933;">;</span>
&nbsp;
@WebService<span style="color: #009900;">&#40;</span>endpointInterface<span style="color: #339933;">=&amp;</span>quot<span style="color: #339933;">;</span>IMyService<span style="color: #339933;">&amp;</span>quot<span style="color: #339933;">;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyService <span style="color: #000000; font-weight: bold;">implements</span> IMyService <span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #003399;">String</span> mangle<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #000066; font-weight: bold;">char</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> chars <span style="color: #339933;">=</span> s.<span style="color: #006633;">toCharArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #666666; font-style: italic;">//We don't have Arrays.reverse() in Java</span>
                <span style="color: #000066; font-weight: bold;">int</span> offset <span style="color: #339933;">=</span> chars.<span style="color: #006633;">length</span> <span style="color: #339933;">-</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
                <span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>  i <span style="color: #339933;">&lt;</span> chars.<span style="color: #006633;">length</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #000066; font-weight: bold;">char</span> c <span style="color: #339933;">=</span> chars<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                        chars<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> chars<span style="color: #009900;">&#91;</span>i <span style="color: #339933;">+</span> offset<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                        chars<span style="color: #009900;">&#91;</span>i <span style="color: #339933;">+</span> offset<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> c<span style="color: #339933;">;</span>
                        offset <span style="color: #339933;">-=</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
&nbsp;
                <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">String</span><span style="color: #009900;">&#40;</span>chars<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Please note that AFAIK <code>MyService</code> does not have to implement <code>IMyService</code> and that the endpointInterface member inside the <code>@WebService</code> annotation is the construct that creates the link between the service and its implementation.</p>
<p>Of course interface-first isn&#8217;t perfect either. The developer is creating a web service while dealing with methods, parameters and objects so the web services produced might be more object-centric (introducing interoperability problems) than required. The <a href="http://msdn.microsoft.com/msdnmag/issues/05/05/ServiceStation/">first</a> of the above articles has a really good discussion on when to use WSDL-first and when code-first (expose a class not an interface) that has some information that also apply to WSDL-first vs interface-first.</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.tzavellas.com/techblog/2005/07/31/contract-first-service-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OnJava Axis2 article</title>
		<link>http://www.tzavellas.com/techblog/2005/07/31/onjava-axis2-article/</link>
		<comments>http://www.tzavellas.com/techblog/2005/07/31/onjava-axis2-article/#comments</comments>
		<pubDate>Sun, 31 Jul 2005 18:11:45 +0000</pubDate>
		<dc:creator>spiros</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://www.tzavellas.com/techblog/?p=17</guid>
		<description><![CDATA[OnJava has published an article about how to implement message oriented web services in Apache Axis2. The title of the article is “Web Services Messaging with Apache Axis2: Concepts and Techniques” and it is written by Srinath Perera and Ajith Ranabahu (both Axis2 developers). I believe that the above article is very interesting since it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.onjava.com">OnJava</a> has published an <a href="http://www.onjava.com/lpt/a/6076">article</a> about how to implement message oriented web services in <a href="http://ws.apache.org/axis2/">Apache Axis2</a>. The title of the article is <a href="http://www.onjava.com/lpt/a/6076">“Web Services Messaging with Apache Axis2: Concepts and Techniques”</a> and it is written by Srinath Perera and Ajith Ranabahu (both <a href="http://ws.apache.org/axis2/">Axis2</a> developers).</p>
<p>I believe that the above article is very interesting since it provides an introduction to both messaging and the API of the new version of Axis.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tzavellas.com/techblog/2005/07/31/onjava-axis2-article/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
