<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Always looking for a better way...</title>
	<atom:link href="http://sphericalimprovement.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://sphericalimprovement.wordpress.com</link>
	<description></description>
	<lastBuildDate>Fri, 02 Jan 2009 14:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='sphericalimprovement.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/66c4a46682ded7235c1ff4dcf0931f75?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Always looking for a better way...</title>
		<link>http://sphericalimprovement.wordpress.com</link>
	</image>
			<item>
		<title>SOAP Web services in a Java EE 5 world</title>
		<link>http://sphericalimprovement.wordpress.com/2009/01/02/soap-web-services-in-a-java-ee-5-world/</link>
		<comments>http://sphericalimprovement.wordpress.com/2009/01/02/soap-web-services-in-a-java-ee-5-world/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 14:21:55 +0000</pubDate>
		<dc:creator>Mike Bowler</dc:creator>
				<category><![CDATA[Software development]]></category>
		<category><![CDATA[java glassfish webservices jsr181]]></category>

		<guid isPermaLink="false">http://sphericalimprovement.wordpress.com/?p=22</guid>
		<description><![CDATA[SOAP web services in Java have traditionally been far more trouble than they&#8217;ve been worth.  The old model of generating stubs and tweaking configuration files was sufficiently painful that it made the whole process very unpleasant.
In Java EE 5, most of this pain has disappeared; at least for simple web services.  JSR-181 defines annotations for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sphericalimprovement.wordpress.com&blog=3670000&post=22&subd=sphericalimprovement&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>SOAP web services in Java have traditionally been far more trouble than they&#8217;ve been worth.  The old model of generating stubs and tweaking configuration files was sufficiently painful that it made the whole process very unpleasant.</p>
<p>In Java EE 5, most of this pain has disappeared; at least for simple web services.  JSR-181 defines annotations for web services that remove most of the complexity.  For example&#8230;</p>
<pre style="padding-left:30px;">import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService
public class SimpleWebService {

    @WebMethod
    public String doIt(String message) {
        return "got "+message;
    }
}</pre>
<p>In this sample, when the WAR (or EAR) file is deployed to the server, the container will scan for the @WebService annotation and will automatically deploy this as a web service.  I use glassfish v2 for this and it works seamlessly.</p>
<p>Oh, there&#8217;s still one gotcha of course.  The container will only scan for the annotations if it thinks this is a Java EE 5 application.  To make sure that it knows that, you have to ensure that your web.xml has the appropriate version attribute on it.  The one I&#8217;m using for the sample above is this&#8230;</p>
<pre style="padding-left:30px;">&lt;web-app <strong>version="2.5"</strong>
  xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;

  &lt;session-config&gt;
    &lt;session-timeout&gt;30&lt;/session-timeout&gt;
  &lt;/session-config&gt;
  &lt;welcome-file-list&gt;
    &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
&lt;/web-app&gt;</pre>
<p>So what if you&#8217;re using maven to do your builds like I do?  A quick google search will turn up lots of advice on how you need to install the jaxws-maven-plugin and add it to your build process so that it generates all kinds of pieces.  This is great if you&#8217;re using older web services but is completely unnecessary in Java EE 5.  The only thing you need to do with maven is add dependencies for the Java EE 5 api&#8217;s</p>
<pre style="padding-left:30px;">&lt;dependency&gt;</pre>
<pre style="padding-left:30px;">    &lt;groupId&gt;javax.xml.ws&lt;/groupId&gt;</pre>
<pre style="padding-left:30px;">    &lt;artifactId&gt;jaxws-api&lt;/artifactId&gt;</pre>
<pre style="padding-left:30px;">    &lt;version&gt;2.1-1&lt;/version&gt;</pre>
<pre style="padding-left:30px;">    &lt;scope&gt;provided&lt;/scope&gt;</pre>
<pre style="padding-left:30px;">&lt;/dependency&gt;</pre>
<p>You want the scope to be &#8220;provided&#8221; so that this jar doesn&#8217;t get packaged into your war file.  And that&#8217;s it.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sphericalimprovement.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sphericalimprovement.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sphericalimprovement.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sphericalimprovement.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sphericalimprovement.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sphericalimprovement.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sphericalimprovement.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sphericalimprovement.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sphericalimprovement.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sphericalimprovement.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sphericalimprovement.wordpress.com&blog=3670000&post=22&subd=sphericalimprovement&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sphericalimprovement.wordpress.com/2009/01/02/soap-web-services-in-a-java-ee-5-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a966b9ce0a0393c01096bfdc00dd9b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mbowler</media:title>
		</media:content>
	</item>
		<item>
		<title>The story so far&#8230;</title>
		<link>http://sphericalimprovement.wordpress.com/2009/01/02/the-story-so-far/</link>
		<comments>http://sphericalimprovement.wordpress.com/2009/01/02/the-story-so-far/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 01:31:11 +0000</pubDate>
		<dc:creator>Mike Bowler</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://sphericalimprovement.wordpress.com/?p=12</guid>
		<description><![CDATA[About four years ago, I started a blog at my own domain of sphericalimprovement.com.  No need to link since it isn&#8217;t there anymore.
I wrote to that blog in bursts over the four years and accumulated a decent amount of content.  Lots of technical content on programming and agile development practices interspersed with other things that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sphericalimprovement.wordpress.com&blog=3670000&post=12&subd=sphericalimprovement&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>About four years ago, I started a blog at my own domain of sphericalimprovement.com.  No need to link since it isn&#8217;t there anymore.</p>
<p>I wrote to that blog in bursts over the four years and accumulated a decent amount of content.  Lots of technical content on programming and agile development practices interspersed with other things that caught my interest.</p>
<p>In order to lower my hosting costs, I&#8217;d wanted to move that blog to one of the free services like this one (WordPress) but it wasn&#8217;t easy to migrate from the blog software I was using and there was always something more important on my todo list.</p>
<p>Recently, that blog got hacked and subsequently wiped by the hosting company it was at.  They had backups but it would have been a lot of work to secure the site and get it up and running again so I made the call to just let it go.</p>
<p>I&#8217;d thought that I&#8217;d just let blogging go entirely but I&#8217;m finding that more difficult than I&#8217;d thought.  Situations are coming up that I want to blog about and I&#8217;m finding it frustrating that I don&#8217;t have a place to write about these things anymore.  So here we are again.  This is a new blog with none of the old content.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/sphericalimprovement.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/sphericalimprovement.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/sphericalimprovement.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/sphericalimprovement.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/sphericalimprovement.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/sphericalimprovement.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/sphericalimprovement.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/sphericalimprovement.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/sphericalimprovement.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/sphericalimprovement.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=sphericalimprovement.wordpress.com&blog=3670000&post=12&subd=sphericalimprovement&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://sphericalimprovement.wordpress.com/2009/01/02/the-story-so-far/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a966b9ce0a0393c01096bfdc00dd9b0f?s=96&#38;d=identicon" medium="image">
			<media:title type="html">mbowler</media:title>
		</media:content>
	</item>
	</channel>
</rss>