<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Lijin's Localhost</title>
	
	<link>http://lijinjoseji.wordpress.com</link>
	<description>The future belongs to those who believe in the beauty of their dreams.</description>
	<lastBuildDate>Mon, 31 Aug 2009 14:18:30 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain="lijinjoseji.wordpress.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" />
<image><link>http://lijinjoseji.wordpress.com</link><url>http://www.feedburner.com/fb/images/pub/fb_pwrd.gif</url><title>Lijin's Blog : Spring and Hibernate</title></image>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/LijinsBlog" type="application/rss+xml" /><feedburner:emailServiceId>LijinsBlog</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/LijinsBlog" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://my.feedlounge.com/external/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://static.feedlounge.com/buttons/subscribe_0.gif">Subscribe with FeedLounge</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.inclue.com/client/1?feed=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://www.inclue.com/friends/chicklet.gif">Subscribe with inclue!</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://odeo.com/listen/subscribe?feed=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://odeo.com/img/badge-channel-black.gif">Subscribe with ODEO</feedburner:feedFlare><feedburner:feedFlare href="http://www.podnova.com/add.srf?url=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://www.podnova.com/img_chicklet_podnova.gif">Subscribe with Podnova</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.yourminis.com/subscribe.aspx?u=http%3A%2F%2Ffeeds.feedburner.com%2FLijinsBlog" src="http://www.yourminis.com/images/addtoyourminisbadge.gif">Subscribe with Yourminis.com</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>A review of “SOA with Java” book from Packt.</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/Zbsd7wzMUsg/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/08/31/a-review-of-soa-with-java-book-from-packt/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 14:18:30 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[CXF]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Packt]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[axis2]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/08/31/a-review-of-soa-with-java-book-from-packt/</guid>
		<description><![CDATA[Book Name: Service Oriented Architecture with Java 
Authors&#160;&#160;&#160;&#160;&#160; : Binildas A. Christudas,Malhar Barai, &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Vincenzo Caselli&#160;
Publisher&#160;&#160; :&#160;Packt
Language&#160; : English
 

Why this book is Special?

This book is special because of one reason. It collectively describes all the information and frameworks those a Java Web Service Programmer wants to know. If you are a Java developer and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=633&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote><p><strong>Book Name:</strong> <a href="http://www.packtpub.com/service-oriented-architecture-for-java-applications#ebook/book/mid/270809l9nufd">Service Oriented Architecture with Java</a> <a href="http://83.166.169.240/service-oriented-architecture-for-java-applications#ebook/book"><img title="1847193218" style="display:inline;margin-left:0;margin-right:0;border-width:0;" height="112" alt="1847193218" src="http://lijinjoseji.files.wordpress.com/2009/08/1847193218.png?w=94&#038;h=112" width="94" align="right" border="0" /></a></p>
<p><strong>Authors&#160;&#160;&#160;&#160;&#160; :</strong> <a href="http://83.166.169.240/author_view_profile/id/180">Binildas A. Christudas</a>,<a href="http://83.166.169.240/author_view_profile/id/219">Malhar Barai</a>, <a href="http://83.166.169.240/author_view_profile/id/220">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Vincenzo Caselli</a>&#160;</p>
<p><strong>Publisher&#160;&#160; :</strong>&#160;<a href="http://www.packtpub.com/">Packt</a></p>
<p><strong>Language&#160; </strong>: English</p>
<p><a href="http://lijinjoseji.files.wordpress.com/2009/08/4stars.jpg"><img title="4 stars" style="display:inline;border-width:0;" height="21" alt="4 stars" src="http://lijinjoseji.files.wordpress.com/2009/08/4stars_thumb.jpg?w=93&#038;h=21" width="93" border="0" /></a> </p>
</blockquote>
<p><u><strong>Why this book is Special?</strong></u></p>
<ul>
<li>This book is special because of one reason. It collectively describes all the information and frameworks those a Java Web Service Programmer wants to know. If you are a Java developer and wants to implement SOA through Web Services then I am sure this book will give you a good idea about the frameworks those will help you for this. </li>
</ul>
<p><u><strong>To whom this book is helpful?</strong></u></p>
<ul>
<li>If you are a Java Programmer who wants to learn more about SOA with web services..</li>
<li>If you want to learn any of the Famous Java Web service Implementation frameworks like Axis2, Spring WS, CXF etc.. OR if you need to know more basic but mush needed information about SOA using Web services.</li>
<li>If you want to get some idea about SCA and SDO. </li>
</ul>
<p><u><strong>Advantages:</strong></u></p>
<ul>
<li>Even if you are new to the web service concepts also you can use this book. Its starts from the beginning.</li>
<li>Start with explaining how SOA helps in the Software world and what all are its advantages.</li>
<li>It explains about <strong>RPC and Document Based-WS</strong> and all its basics.</li>
<li>If you are familiar with Ant then examples will be more easy because almost all examples are using Ant scripts.</li>
<li>It also goes through JAXB binding and its examples. </li>
<li>It will be very rare to get books related with Service Component Architecture this time. This book had a good explanation about this Architecture and it gives a good example with its description. Being a person who implemented SCA this section was very interesting to me.</li>
<li>Gives a very good introduction about MOM and ESBs. If you are just starting to learn these then this book will be helpful to you.</li>
<li>It gives web service implementation examples with multiple frameworks. CXF, Axis2 and <a href="http://www.springframework.com/" target="_blank">Spring</a> WS are the most famous two frameworks which we are using nowadays. And you can find examples for these three frameworks application examples.</li>
</ul>
<p><u><strong>Disadvantages:</strong></u></p>
<ul>
<li>I think description is less for each topics. Book is covering a lot of topics and for each one we can write one entire book. But as a reader of this book I am expecting some more explanation for each topic. Sometimes I feel the author is just touching a topic and going to the next one.</li>
<li>Some of the Described Versions became OLD. For example <a href="http://ws.apache.org/axis2/" target="_blank">Axis2</a> is there now. Book is already mentioned Axis2 and <a href="http://cxf.apache.org/" target="_blank">CXF</a> but taken Axis1.x and XFire for the further explanation. </li>
</ul>
Posted in axis2, CXF, Frameworks, Packt, Spring, Spring Framework  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/633/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/633/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/633/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=633&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/08/31/a-review-of-soa-with-java-book-from-packt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>

		<media:content url="http://lijinjoseji.files.wordpress.com/2009/08/1847193218.png" medium="image">
			<media:title type="html">1847193218</media:title>
		</media:content>

		<media:content url="http://lijinjoseji.files.wordpress.com/2009/08/4stars_thumb.jpg" medium="image">
			<media:title type="html">4 stars</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/08/31/a-review-of-soa-with-java-book-from-packt/</feedburner:origLink></item>
		<item>
		<title>Story of an Old Carpenter</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/rbIluJ61-VA/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/07/14/story-of-an-old-carpenter/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 14:41:32 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/07/14/story-of-an-old-carpenter/</guid>
		<description><![CDATA[“Your life today is the result of your attitudes and choices in the past. Your life tomorrow will be the result.&#34; 

This is a story of an elderly carpenter who had been working for a contractor for the past 53 years. He had built many beautiful houses but now as he was getting old, he [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=628&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><blockquote><p>“Your life today is the result of your attitudes and choices in the past. Your life tomorrow will be the result.&quot; </p>
</blockquote>
<p>This is a story of an elderly carpenter who had been working for a contractor for the past 53 years. He had built many beautiful houses but now as he was getting old, he wanted to retire and lead a leisurely life with his family. So, he goes to the contractor and tells him about his plan of retiring. The contractor feels sad at the prospect of losing a good worker but agrees to the plan because the carpenter had indeed become too fragile for the tough building work. But as a last request, he asks the old carpenter to construct just one last house.     <br />The old man agrees and starts working but his heart was not in his work any more. He had lost the motivation towards work. So, he resorted to shoddy workmanship and constructed the house half-heartedly. After the house was built, the contractor came to visit his employee’s last piece of work. After inspecting the house, he handed over the front door keys to the carpenter and said, “This is your new house. My gift to you.” The carpenter was shocked and upset. Had he known that he was building his own house, he would have done a better job! Now, he would have to live in the house, which is not worth staying.    <br />Think of yourself as the carpenter. You work hard every day but are you giving your best? We put our least to the work we don’t like or do not have interest in. Later, we get shocked at the situation we have created for ourselves and try to figure out why we didn’t do it differently.     <br />Enjoy your tasks and carry on your responsibilities with pleasure and not with pain. “Life is a do-it-yourself project”. Do your job enthusiastically and with devotion, a positive output and a pleasing life will certainly be on your way. </p>
Posted in Java  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/628/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/628/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/628/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=628&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/07/14/story-of-an-old-carpenter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/07/14/story-of-an-old-carpenter/</feedburner:origLink></item>
		<item>
		<title>Creating Web Services using CXF (Contract first Approach) Part 2 : WSDL Creation.</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/IfHrfd0xAek/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/06/15/creating-web-services-using-cxf-contract-first-approach-part-2-wsdl-creation/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 11:38:55 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[CXF]]></category>
		<category><![CDATA[Celtix]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Xfire]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/06/15/creating-web-services-using-cxf-contract-first-approach-part-2-wsdl-creation/</guid>
		<description><![CDATA[What is WSDL and what its Structure?
A WSDL document defines services as collections of network endpoints, or ports. In WSDL, the abstract definition of endpoints and messages is separated from their concrete network deployment or data format bindings. This allows the reuse of abstract definitions: messages, which are abstract descriptions of the data being exchanged, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=601&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h4><strong>What is WSDL and what its Structure?</strong></h4>
<p>A WSDL document defines services as collections of network endpoints, or ports. In WSDL, the abstract definition of endpoints and messages is separated from their concrete network deployment or data format bindings. This allows the reuse of abstract definitions: messages, which are abstract descriptions of the data being exchanged, and port types which are abstract collections of operations. </p>
<p>The concrete protocol and data format specifications for a particular port type constitutes a reusable binding. A port is defined by associating a network address with a reusable binding, and a collection of ports define a service. Hence, a WSDL document uses the following elements in the definition of network services:</p>
<p>WSDL document describes a web service using these major elements:</p>
<p>
<table cellspacing="0" cellpadding="0" border="1">
<tbody>
<tr>
<td width="20%">
<p><b>Element</b></p>
</td>
<td width="80%">
<p><b>Defines</b></p>
</td>
</tr>
<tr>
<td valign="top">
<p>&lt;types&gt;</p>
</td>
<td valign="top">
<p>The data types used by the web service</p>
</td>
</tr>
<tr>
<td valign="top">
<p>&lt;message&gt;</p>
</td>
<td valign="top">
<p>The messages used by the web service</p>
</td>
</tr>
<tr>
<td valign="top">
<p>&lt;portType&gt;</p>
</td>
<td valign="top">
<p>The operations performed by the web service</p>
</td>
</tr>
<tr>
<td valign="top">
<p>&lt;binding&gt;</p>
</td>
<td valign="top">
<p>The communication protocols used by the web service</p>
</td>
</tr>
<tr>
<td valign="top">&lt;port&gt;</td>
<td valign="top">A single endpoint defined as a combination of a binding and a network address.</td>
</tr>
<tr>
<td valign="top">&lt;service&gt;</td>
<td valign="top">A collection of related endpoints.</td>
</tr>
</tbody>
</table>
<p>The main structure of a WSDL document looks like this:<br />
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<p><em>&lt;definitions&gt;                <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#800040">&lt;types&gt;                  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; definition of types&#8230;&#8230;..                   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/types&gt;</font>                 <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#008000">&lt;message&gt;                  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; definition of a message&#8230;.                   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/message&gt;                   <br /></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#ff8000">&lt;portType&gt;                  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; definition of a port&#8230;&#8230;.                   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/portType&gt;                   <br /></font>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <font color="#0000a0"></font></em><em><font color="#0000a0">&lt;binding&gt;                  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; definition of a binding&#8230;.                   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/binding&gt;</font></em></p>
<p><em><font color="#0000a0">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; </font><font color="#0080c0">&lt;service&gt;                  <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; definition of services&#8230;.                   <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/service&gt;</font></em><em><font color="#0000a0">                  <br /></font>&lt;/definitions&gt;</em></p>
</td>
</tr>
</tbody>
</table>
<p>A WSDL document can also contain other elements, like extension elements and a service element that makes it possible to group together the definitions of several web services in one single WSDL document.</p>
<p><strong>Creating WSDL for our Example</strong></p>
<p><em><font color="#800040"><strong>&lt;types&gt;:</strong>In the Types we are defining or configuring the Datatypes which we are using for the entire application. Here we are importing the XSD files here.</font></em></p>
<p><em><font color="#008000"><strong>&lt;message&gt;:</strong></font></em><em><font color="#008000">In our example we need to configure our input and our parameters/ the message which we are passing through Webservice. We are configuring request and response objects here.</font></em></p>
<p><em><font color="#ff8000"><strong>&lt;portType&gt;: </strong></font></em><em><font color="#ff8000">We have one operation which is called getProduct. So here we need to declare this getProduct operation.</font></em></p>
<p><em><font color="#0000a0"><strong>&lt;binding&gt;</strong> : </font></em><em><font color="#0000a0">Here we will be providing our protocol types and we are using SOAP protocol.</font></em></p>
<p><em><font color="#0080c0"><strong>&lt;service&gt;</strong> : Defining the Service End point. And for the ProductService we are defining it as </font><a title="http://localhost:8080/ContractFirst/services/ProductService" href="http://localhost:8080/ContractFirst/services/ProductService"><font color="#0080c0">“http://localhost:8080/ContractFirst/services/ProductService</font></a><font color="#0080c0">”</font></em></p>
<p><em><font color="#ff8000"></font></em><em><font color="#008000"></font></em></p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> &lt;?xml version=<span style="color:#006080;">&quot;1.0&quot;</span> encoding=<span style="color:#006080;">&quot;UTF-8&quot;</span> standalone=<span style="color:#006080;">&quot;no&quot;</span>?&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> &lt;wsdl:definitions xmlns:soap=<span style="color:#006080;">&quot;http://schemas.xmlsoap.org/wsdl/soap/&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span>     xmlns:tns=<span style="color:#006080;">&quot;http://com/your/company/service/ProductService/&quot;</span> xmlns:wsdl=<span style="color:#006080;">&quot;http://schemas.xmlsoap.org/wsdl/&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>     xmlns:xsd=<span style="color:#006080;">&quot;http://www.w3.org/2001/XMLSchema&quot;</span> name=<span style="color:#006080;">&quot;ProductService&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span>     targetNamespace=<span style="color:#006080;">&quot;http://com/your/company/service/ProductService/&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span>     xmlns:prd=<span style="color:#006080;">&quot;http://com/your/company/service/Product/&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span>     &lt;wsdl:types&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>         &lt;xsd:schema targetNamespace=<span style="color:#006080;">&quot;http://com/your/company/service/ProductService/&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span>             xmlns:prd=<span style="color:#006080;">&quot;http://com/your/company/service/Product/&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span>             &lt;xsd:import <span style="color:#0000ff;">namespace</span>=<span style="color:#006080;">&quot;http://com/your/company/service/Product/&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>                 schemaLocation=<span style="color:#006080;">&quot;../Product.xsd&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;getProductRequest&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>                 &lt;xsd:complexType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>                     &lt;xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>                         &lt;xsd:element name=<span style="color:#006080;">&quot;productRequest&quot;</span> type=<span style="color:#006080;">&quot;prd:ProductRequest&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>                     &lt;/xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>                 &lt;/xsd:complexType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>             &lt;/xsd:element&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;getProductResponse&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>                 &lt;xsd:complexType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>                     &lt;xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>                         &lt;xsd:element name=<span style="color:#006080;">&quot;productResponse&quot;</span> type=<span style="color:#006080;">&quot;prd:ProductResponse&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>                     &lt;/xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>                 &lt;/xsd:complexType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>             &lt;/xsd:element&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>         &lt;/xsd:schema&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>     &lt;/wsdl:types&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>     &lt;wsdl:message name=<span style="color:#006080;">&quot;ProductRequest&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>         &lt;wsdl:part element=<span style="color:#006080;">&quot;tns:getProductRequest&quot;</span> name=<span style="color:#006080;">&quot;parameters&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span>     &lt;/wsdl:message&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  31:</span>     &lt;wsdl:message name=<span style="color:#006080;">&quot;ProductResponse&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  32:</span>         &lt;wsdl:part element=<span style="color:#006080;">&quot;tns:getProductResponse&quot;</span> name=<span style="color:#006080;">&quot;parameters&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  33:</span>     &lt;/wsdl:message&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  34:</span>     &lt;wsdl:portType name=<span style="color:#006080;">&quot;ProductService&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  35:</span>         &lt;wsdl:operation name=<span style="color:#006080;">&quot;getProduct&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  36:</span>             &lt;wsdl:input message=<span style="color:#006080;">&quot;tns:ProductRequest&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  37:</span>             &lt;wsdl:output message=<span style="color:#006080;">&quot;tns:ProductResponse&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  38:</span>         &lt;/wsdl:operation&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  39:</span>     &lt;/wsdl:portType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  40:</span>     &lt;wsdl:binding name=<span style="color:#006080;">&quot;ProductServiceSOAP&quot;</span> type=<span style="color:#006080;">&quot;tns:ProductService&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  41:</span>         &lt;soap:binding style=<span style="color:#006080;">&quot;document&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  42:</span>             transport=<span style="color:#006080;">&quot;http://schemas.xmlsoap.org/soap/http&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  43:</span>         &lt;wsdl:operation name=<span style="color:#006080;">&quot;getProduct&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  44:</span>             &lt;soap:operation</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  45:</span>                 soapAction=<span style="color:#006080;">&quot;http://com/your/company/service/ProductService/getProduct&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  46:</span>             &lt;wsdl:input&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  47:</span>                 &lt;soap:body use=<span style="color:#006080;">&quot;literal&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  48:</span>             &lt;/wsdl:input&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  49:</span>             &lt;wsdl:output&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  50:</span>                 &lt;soap:body use=<span style="color:#006080;">&quot;literal&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  51:</span>             &lt;/wsdl:output&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  52:</span>         &lt;/wsdl:operation&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  53:</span>     &lt;/wsdl:binding&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  54:</span>     &lt;wsdl:service name=<span style="color:#006080;">&quot;ProductService&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  55:</span>         &lt;wsdl:port binding=<span style="color:#006080;">&quot;tns:ProductServiceSOAP&quot;</span> name=<span style="color:#006080;">&quot;ProductServiceSOAP&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  56:</span>             &lt;soap:address</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  57:</span>                 location=<span style="color:#006080;">&quot;http://localhost:8080/ContractFirst/services/ProductService&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  58:</span>         &lt;/wsdl:port&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  59:</span>     &lt;/wsdl:service&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  60:</span> &lt;/wsdl:definitions&gt;</pre>
</p></div>
</div>
<p>In our next part we will go through Skelton creation using WSDL to Java tool which is giving by <a href="http://cxf.apache.org/" target="_blank">CXF</a>. We will go through class path settings and wsdl2java commands.</p>
Posted in Celtix, CXF, Spring, web, webservices, Xfire  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/601/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/601/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/601/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=601&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/06/15/creating-web-services-using-cxf-contract-first-approach-part-2-wsdl-creation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/06/15/creating-web-services-using-cxf-contract-first-approach-part-2-wsdl-creation/</feedburner:origLink></item>
		<item>
		<title>Creating “Contract First” – Web Services using CXF (Top Down Approach) Part 1: Creating XSDs.</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/8oG3OMPNXtk/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/06/15/creating-contract-first-web-services-using-cxf-top-down-approach-part-1-creating-xsds/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 06:48:03 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[CXF]]></category>
		<category><![CDATA[Contract First]]></category>
		<category><![CDATA[WSDL]]></category>
		<category><![CDATA[XSD]]></category>
		<category><![CDATA[Xfire]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/06/15/creating-contract-first-web-services-using-cxf-top-down-approach-part-1-creating-xsds/</guid>
		<description><![CDATA[Why people are interested in CODE-FIRST approach? Answer is simple. No need to go through the complexities of XML, XSD, WSDL structure. Just code in any of your favorite programming language and create the WSDL file using any of your tools/frameworks. I had taken some interviews these days for a Webservice-SOA project. Honestly it was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=597&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Why people are interested in CODE-FIRST approach? Answer is simple. No need to go through the complexities of XML, XSD, WSDL structure. Just code in any of your favorite programming language and create the WSDL file using any of your tools/frameworks. I had taken some interviews these days for a Webservice-SOA project. Honestly it was too difficult to find out the right candidates with good knowledge in Webservices. Most of them are just consumed webservices. And if we find somebody who developed webservices then they would be just familiar with the Code first approach and have no idea about WSDL files. Becuase just seeing WSDL in that endpoint URL finishes their works.</p>
<p>Here in this series of Posts I would like to put a small webservice example which is doing in “CONTRACT FIRST” approach.</p>
<blockquote><p>If you want to go through a <strong>Code-First Approach</strong> using <a href="http://cxf.apache.org/" target="_blank">CXF</a> then please check my previous posts. For your convenience I am pasting it below.</p>
<ol>
<li><a href="http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/">Creating Web services using Apache CXF (Part 1) : The Basics.</a> </li>
<li><a href="http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-2-development/">Creating Web services using Apache CXF (Part 2) : Development</a>. </li>
<li><a href="http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-3-configurations/">Creating Web services using Apache CXF (Part 3) : Configuration</a>. </li>
<li><a href="http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-4-testing/">Creating Web services using Apache CXF (Part 4): Testing</a>. </li>
</ol>
</blockquote>
<p><strong>Why we require CONTRACT FIRST approach?</strong></p>
<p>This <a href="http://soa.sys-con.com/node/143909" target="_blank">article from SOA world will help you to understand</a>. A contract-first approach results in better long-term development, interoperability, and maintenance. <strong>For larger applications, long-lasting Web services, and service-oriented architecture (SOA), contract-first thinking has advantages that usually outweigh the ease of method-first thinking</strong>. I know first exposure to Web services, WSDL and Schema are very tough to grasp but when you are coming into a BIG SOA application development people will choose contract-first. At least me!</p>
<p><strong>Some of the Points for this selection are:</strong></p>
<ul>
<li>Its better to define data types and all first than converting from a programming language. </li>
<li>It makes you be very clear with both the producer and consumer of the service exactly what is needed and what is expected </li>
<li>Contract-first is the generally accepted &#8216;best practice”. </li>
</ul>
<p><strong><u>Creating a small webservice application using CXF</u></strong></p>
<p>Lets start our example. Want we are trying to achieve is, we want to deploy a service called “getProduct”. If we are giving a “Composite ID” as an input to our web service then it should return a Product Details to us.</p>
<p>First we will start with our XSD structure. Even though this is a small service and we can define it inside the WSDL itself, we will create a separate XSD for our better understanding. We can import this XSD in the types tag of WSDL. </p>
<p><strong><u>Creating our XSD</u></strong></p>
<p>Here I had created one ProductDetails and one ProductId types.</p>
<p>Product Details contains all the product related information like productname, category, price and details. ProductId type is a composite primary key with sequence number and deptcode. I am also created a request and response types here. </p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> &lt;?xml version=<span style="color:#006080;">&quot;1.0&quot;</span> encoding=<span style="color:#006080;">&quot;UTF-8&quot;</span>?&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> &lt;xsd:schema targetNamespace=<span style="color:#006080;">&quot;http://com/your/company/service/Product/&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span>     xmlns:prd=<span style="color:#006080;">&quot;http://com/your/company/service/Product/&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>     elementFormDefault=<span style="color:#006080;">&quot;qualified&quot;</span> xmlns:xsd=<span style="color:#006080;">&quot;http://www.w3.org/2001/XMLSchema&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span>     &lt;xsd:complexType name=<span style="color:#006080;">&quot;productID&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span>         &lt;xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span>             &lt;xsd:element minOccurs=<span style="color:#006080;">&quot;0&quot;</span> name=<span style="color:#006080;">&quot;sequenceNumber&quot;</span> type=<span style="color:#006080;">&quot;xsd:int&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>             &lt;xsd:element minOccurs=<span style="color:#006080;">&quot;0&quot;</span> name=<span style="color:#006080;">&quot;deptNumber&quot;</span> type=<span style="color:#006080;">&quot;xsd:string&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span>         &lt;/xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span>     &lt;/xsd:complexType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>     &lt;xsd:complexType name=<span style="color:#006080;">&quot;productDetails&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>         &lt;xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;id&quot;</span> nillable=<span style="color:#006080;">&quot;false&quot;</span> type=<span style="color:#006080;">&quot;prd:productID&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;productName&quot;</span> nillable=<span style="color:#006080;">&quot;false&quot;</span> type=<span style="color:#006080;">&quot;xsd:string&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;category&quot;</span> nillable=<span style="color:#006080;">&quot;true&quot;</span> type=<span style="color:#006080;">&quot;xsd:string&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;price&quot;</span> nillable=<span style="color:#006080;">&quot;false&quot;</span> type=<span style="color:#006080;">&quot;xsd:long&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;details&quot;</span> nillable=<span style="color:#006080;">&quot;true&quot;</span> type=<span style="color:#006080;">&quot;xsd:string&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>         &lt;/xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>     &lt;/xsd:complexType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>     &lt;xsd:complexType name=<span style="color:#006080;">&quot;ProductRequest&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>         &lt;xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;productID&quot;</span> type=<span style="color:#006080;">&quot;prd:productID&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>         &lt;/xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>     &lt;/xsd:complexType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>     &lt;xsd:complexType name=<span style="color:#006080;">&quot;ProductResponse&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>         &lt;xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>             &lt;xsd:element name=<span style="color:#006080;">&quot;product&quot;</span> type=<span style="color:#006080;">&quot;prd:productDetails&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>         &lt;/xsd:sequence&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>     &lt;/xsd:complexType&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span> &lt;/xsd:schema&gt;</pre>
</p></div>
</div>
<blockquote>
<p><strong><a href="http://lijinjoseji.wordpress.com/2009/06/15/creating-web-services-using-cxf-contract-first-approach-part-2-wsdl-creation/" target="_blank">In the next PART we will be creating a small WSDL file which internally using this XSD. Points we cover are WSDL Tags, XSD inclusion, NameSpaces.</a>&#160;<a href="http://lijinjoseji.wordpress.com/2009/06/15/creating-web-services-using-cxf-contract-first-approach-part-2-wsdl-creation/" target="_blank">&lt;Click on this link to move to that post&gt;</a></strong></p>
</blockquote>
Posted in Contract First, CXF, webservices, WSDL, Xfire, XSD  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/597/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/597/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/597/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/597/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/597/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/597/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/597/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/597/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/597/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/597/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=597&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/06/15/creating-contract-first-web-services-using-cxf-top-down-approach-part-1-creating-xsds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/06/15/creating-contract-first-web-services-using-cxf-top-down-approach-part-1-creating-xsds/</feedburner:origLink></item>
		<item>
		<title>Creating Web services using Apache CXF (Part 4): Testing</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/RFubCXfJwxI/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-4-testing/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 10:30:20 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[CXF]]></category>
		<category><![CDATA[Celtix]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Xfire]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-4-testing/</guid>
		<description><![CDATA[
To test this we can follow the same client program which is given in the CXF site.
Just create a simple Java class and execute it.


   1: package com.your.company.service.client;
   2:&#160; 
   3: import java.util.List;
   4:&#160; 
   5: import org.apache.cxf.interceptor.LoggingInInterceptor;
   6: import org.apache.cxf.interceptor.LoggingOutInterceptor;
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=589&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /></p>
<p>To test this we can follow the same client program which is given in the <a href="http://cxf.apache.org/" target="_blank">CXF</a> site.</p>
<p>Just create a simple Java class and execute it.</p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> package com.your.company.service.client;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span> import java.util.List;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span> import org.apache.cxf.interceptor.LoggingInInterceptor;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span> import org.apache.cxf.interceptor.LoggingOutInterceptor;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span> import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span> import com.your.company.service.Product;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span> import com.your.company.service.ProductService;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span> <span style="color:#0000ff;">public</span> final <span style="color:#0000ff;">class</span> Client {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>     <span style="color:#0000ff;">private</span> Client() {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">static</span> <span style="color:#0000ff;">void</span> main(String args[]) throws Exception {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>         JaxWsProxyFactoryBean factory = <span style="color:#0000ff;">new</span> JaxWsProxyFactoryBean();</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>         factory.getInInterceptors().add(<span style="color:#0000ff;">new</span> LoggingInInterceptor());</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>         factory.getOutInterceptors().add(<span style="color:#0000ff;">new</span> LoggingOutInterceptor());</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>         factory.setServiceClass(ProductService.<span style="color:#0000ff;">class</span>);</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>         factory.setAddress(<span style="color:#006080;">&quot;http://localhost:8080/CXFExample/productservice&quot;</span>);</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>         ProductService client = (ProductService) factory.create();</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>         List&lt;Product&gt; products = client.getProducts();</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>         <span style="color:#0000ff;">if</span> (products != <span style="color:#0000ff;">null</span> &amp;&amp; products.size() &gt; 0)</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>             System.<span style="color:#0000ff;">out</span>.println(<span style="color:#006080;">&quot;Product Name : &quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span>                     + products.get(0).getItemName() + <span style="color:#006080;">&quot;, Price: &quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  31:</span>                     + products.get(0).getPrice());</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  32:</span>         System.exit(0);</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  33:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  34:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  35:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  36:</span> }</pre>
</p></div>
</div>
<p><strong><u>Other related posts:</u></strong></p>
<p>1. <a href="http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/" target="_blank">Creating Web services using Apache CXF (Part 1) : The Basics.</a></p>
<p>2. <a href="http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-2-development/" target="_blank">Creating Web services using Apache CXF (Part 2) : Development</a>.</p>
<p>3. <a href="http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-3-configurations/" target="_blank">Creating Web services using Apache CXF (Part 3) : Configuration</a>.</p>
<p>4. <a href="http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-4-testing/" target="_blank">Creating Web services using Apache CXF (Part 4): Testing</a>.</p>
Posted in apache, Celtix, CXF, web, Web Applications, webservices, Xfire  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/589/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=589&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-4-testing/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-4-testing/</feedburner:origLink></item>
		<item>
		<title>Creating Web services using Apache CXF (Part 3): Configurations</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/INJ8GzQn8D8/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-3-configurations/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 08:42:00 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[CXF]]></category>
		<category><![CDATA[Celtix]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-3-configurations/</guid>
		<description><![CDATA[
Web.xml Declarations 

We have to declare Spring Context Listener, CXF Servlet, Spring Context Location and URL Mapping.


   1: &#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62;
   2: &#60;web-app id=&#34;services&#34; version=&#34;2.5&#34;
   3:     xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34; xmlns=&#34;http://java.sun.com/xml/ns/javaee&#34;
   4:     xmlns:web=&#34;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&#34;
   5:     xsi:schemaLocation=&#34;http://java.sun.com/xml/ns/javaee
  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=587&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><ul>
<li>Web.xml Declarations </li>
</ul>
<p>We have to declare Spring Context Listener, CXF Servlet, Spring Context Location and URL Mapping.</p>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> &lt;?xml version=<span style="color:#006080;">&quot;1.0&quot;</span> encoding=<span style="color:#006080;">&quot;UTF-8&quot;</span>?&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> &lt;web-app id=<span style="color:#006080;">&quot;services&quot;</span> version=<span style="color:#006080;">&quot;2.5&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span>     xmlns:xsi=<span style="color:#006080;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> xmlns=<span style="color:#006080;">&quot;http://java.sun.com/xml/ns/javaee&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>     xmlns:web=<span style="color:#006080;">&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span>     xsi:schemaLocation=<span style="color:#006080;">&quot;http://java.sun.com/xml/ns/javaee</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span>         http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span>     </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>     &lt;!-- Adding the Spring Context Listener. It will help to init Spring Context --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span>     &lt;listener&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span>         &lt;listener-<span style="color:#0000ff;">class</span>&gt; org.springframework.web.context.ContextLoaderListener </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>         &lt;/listener-<span style="color:#0000ff;">class</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>     &lt;/listener&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>     </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>     &lt;!-- Context file location of Spring --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>     &lt;context-param&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>         &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>         &lt;param-<span style="color:#0000ff;">value</span>&gt;/WEB-INF/applicationContext.xml&lt;/param-<span style="color:#0000ff;">value</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>     &lt;/context-param&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>     </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>     &lt;!-- CXF Servlet --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>     &lt;servlet&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>         &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>         &lt;servlet-<span style="color:#0000ff;">class</span>&gt; org.apache.cxf.transport.servlet.CXFServlet </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>         &lt;/servlet-<span style="color:#0000ff;">class</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>     &lt;/servlet&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>     </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>     &lt;!-- Mapping with a URL Pattern --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>     &lt;servlet-mapping&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>         &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span>         &lt;url-pattern&gt;/*&lt;/url-pattern&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  31:</span>     &lt;/servlet-mapping&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  32:</span> &lt;/web-app&gt;</pre>
</p></div>
</div>
<ul>
<li>Application Context configurations </li>
</ul>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> &lt;?xml version=<span style="color:#006080;">&quot;1.0&quot;</span> encoding=<span style="color:#006080;">&quot;UTF-8&quot;</span>?&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span> &lt;beans xmlns=<span style="color:#006080;">&quot;http://www.springframework.org/schema/beans&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span>     xmlns:xsi=<span style="color:#006080;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> xmlns:context=<span style="color:#006080;">&quot;http://www.springframework.org/schema/context&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>     xmlns:cxf=<span style="color:#006080;">&quot;http://cxf.apache.org/core&quot;</span> xmlns:jaxws=<span style="color:#006080;">&quot;http://cxf.apache.org/jaxws&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span>     xsi:schemaLocation=<span style="color:#006080;">&quot;http://www.springframework.org/schema/beans</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span>         http://www.springframework.org/schema/beans/spring-beans-2.5.xsd</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span>         http://www.springframework.org/schema/context</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>         http://www.springframework.org/schema/context/spring-context-2.5.xsd</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span>         http://cxf.apache.org/core</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span>         http://cxf.apache.org/schemas/core.xsd</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>         http://cxf.apache.org/jaxws</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>         http://cxf.apache.org/schemas/jaxws.xsd&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>     <span style="color:#0000ff;">default</span>-autowire=<span style="color:#006080;">&quot;byName&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>     &lt;!-- Load CXF modules from cxf.jar --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>     &lt;import resource=<span style="color:#006080;">&quot;classpath:META-INF/cxf/cxf.xml&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>     &lt;import resource=<span style="color:#006080;">&quot;classpath:META-INF/cxf/cxf-extension-soap.xml&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>     &lt;import resource=<span style="color:#006080;">&quot;classpath:META-INF/cxf/cxf-servlet.xml&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>         </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>     &lt;!-- The service bean --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>     &lt;bean id=<span style="color:#006080;">&quot;productServiceImpl&quot;</span> <span style="color:#0000ff;">class</span>=<span style="color:#006080;">&quot;com.your.company.service.ProductServiceImpl&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>     &lt;!-- Aegis data binding --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>     &lt;bean id=<span style="color:#006080;">&quot;aegisBean&quot;</span> <span style="color:#0000ff;">class</span>=<span style="color:#006080;">&quot;org.apache.cxf.aegis.databinding.AegisDatabinding&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>         scope=<span style="color:#006080;">&quot;prototype&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>     &lt;bean id=<span style="color:#006080;">&quot;aegis-service&quot;</span> <span style="color:#0000ff;">class</span>=<span style="color:#006080;">&quot;org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>         scope=<span style="color:#006080;">&quot;prototype&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>         &lt;property name=<span style="color:#006080;">&quot;dataBinding&quot;</span> <span style="color:#0000ff;">ref</span>=<span style="color:#006080;">&quot;aegisBean&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>         &lt;property name=<span style="color:#006080;">&quot;serviceConfigurations&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span>             &lt;list&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  31:</span>                 &lt;bean <span style="color:#0000ff;">class</span>=<span style="color:#006080;">&quot;org.apache.cxf.jaxws.support.JaxWsServiceConfiguration&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  32:</span>                 &lt;bean <span style="color:#0000ff;">class</span>=<span style="color:#006080;">&quot;org.apache.cxf.aegis.databinding.AegisServiceConfiguration&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  33:</span>                 &lt;bean <span style="color:#0000ff;">class</span>=<span style="color:#006080;">&quot;org.apache.cxf.service.factory.DefaultServiceConfiguration&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  34:</span>             &lt;/list&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  35:</span>         &lt;/property&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  36:</span>     &lt;/bean&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  37:</span>     </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  38:</span>     &lt;!-- Service endpoint --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  39:</span>     &lt;jaxws:endpoint id=<span style="color:#006080;">&quot;productService&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  40:</span>         implementorClass=<span style="color:#006080;">&quot;com.your.company.service.ProductServiceImpl&quot;</span></pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  41:</span>         implementor=<span style="color:#006080;">&quot;#productServiceImpl&quot;</span> address=<span style="color:#006080;">&quot;/productservice&quot;</span>&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  42:</span>         &lt;jaxws:serviceFactory&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  43:</span>             &lt;<span style="color:#0000ff;">ref</span> bean=<span style="color:#006080;">&quot;aegis-service&quot;</span> /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  44:</span>         &lt;/jaxws:serviceFactory&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  45:</span>     &lt;/jaxws:endpoint&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  46:</span>     </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  47:</span>         &lt;!-- Enable message logging <span style="color:#0000ff;">using</span> the CXF logging feature --&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  48:</span>     &lt;cxf:bus&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  49:</span>         &lt;cxf:features&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  50:</span>             &lt;cxf:logging /&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  51:</span>         &lt;/cxf:features&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  52:</span>     &lt;/cxf:bus&gt;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  53:</span> &lt;/beans&gt;</pre>
</p></div>
</div>
<p>Create a WAR out of this Project and deploy it in Apache Tomcat. And try to access the WSDL URL</p>
<p>&#160;<a href="http://localhost:8080/CXFExample/ProductService?wsdl">http://localhost:8080/CXFExample/ProductService?wsdl</a>.</p>
<p><strong><u>Other related posts:</u></strong></p>
<p>1. <a href="http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/" target="_blank">Creating Web services using Apache CXF (Part 1) : The Basics.</a></p>
<p>2. <a href="http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-2-development/" target="_blank">Creating Web services using Apache CXF (Part 2) : Development</a>.</p>
<p>3. <a href="http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-3-configurations/" target="_blank">Creating Web services using Apache CXF (Part 3) : Configuration</a>.</p>
<p>4. <a href="http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-4-testing/" target="_blank">Creating Web services using Apache CXF (Part 4): Testing</a>.</p>
Posted in apache, Celtix, CXF, web, webservices  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/587/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/587/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/587/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=587&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-3-configurations/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-3-configurations/</feedburner:origLink></item>
		<item>
		<title>Creating Web services using Apache CXF (Part 2): Development</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/zP81w92gyjE/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-2-development/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 13:50:59 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[CXF]]></category>
		<category><![CDATA[Celtix]]></category>
		<category><![CDATA[Xfire]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-2-development/</guid>
		<description><![CDATA[We need to set-up the project&#160; environment first. Please download the following JARs.
Versions Used : 
CXF 2.2.2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Download Link : CXF Site&#160;Download Link
Spring 2.5.6&#160;&#160;&#160;&#160;&#160;&#160; Download Link : SpringSource Download site
The following jars are required for all CXF usage: But you will be getting it through CXF Download.      - cxf.jar  [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=580&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>We need to set-up the project&#160; environment first. Please download the following JARs.</p>
<p>Versions Used : </p>
<blockquote><p>CXF 2.2.2&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Download Link : <a href="http://cxf.apache.org/download.html" target="_blank">CXF Site</a>&#160;<a href="http://cxf.apache.org/download.html" target="_blank">Download Link</a></p>
<p>Spring 2.5.6&#160;&#160;&#160;&#160;&#160;&#160; Download Link : <a href="http://www.springsource.org/download" target="_blank">SpringSource Download site</a></p>
<p>The following jars are required for all CXF usage: But you will be getting it through CXF Download.      <br /><em>- cxf.jar        <br />- commons-logging.jar         <br />- geronimo-activation.jar (Or the Sun equivalent) [6]         <br />- geronimo-annotation.jar (Or the Sun equivalent) [6]         <br />- geronimo-javamail.jar (Or the Sun equivalent) [6]         <br />- geronimo-stax-api.jar (Or the Sun equivalent) [6]         <br />- neethi.jar         <br />- jaxb-api.jar&#160; [6]         <br />- jaxb-impl.jar         <br />- XmlSchema.jar         <br />- wstx-asl.jar&#160; [6]         <br />- wsdl4j.jar </em></p>
<p><em>The following jars are required for XML catalog support:        <br />- xml-resolver.jar </em></p>
<p><em>For Java2WSDL and WSDL2Java:        <br />- The above jars         <br />- jaxb-xjc.jar         <br />- velocity.jar         <br />- commons-collections.jar         <br />- commons-lang.jar </em></p>
<p><em>For JAX-WS support:        <br />- geronimo-ws-metadata.jar [6]         <br />- geronimo-jaxws_2.1_spec-1.0.jar (Or the Sun equivalent) [6]         <br />- saaj-api.jar [6]         <br />- saaj-impl.jar [6]         <br />- asm.jar (semi-optional, helps with performance of wrapper types and is         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; required when adding JAXB annotations onto the SEI methods and         <br />&#160;&#160;&#160; parameters.) </em></p>
<p><em>For XML Configuration support:        <br />- aopalliance.jar         <br />- spring-beans.jar         <br />- spring-context.jar         <br />- spring-core.jar         <br />- spring.web.jar         <br />- FastInfoset.jar </em></p>
<p><em>For standalone HTTP support:        <br />- geronimo-servlet.jar         <br />- jetty.jar         <br />- jetty-util.jar         <br />- sl4j.jar &amp; sl4j-jdk14.jar (optional &#8211; but improves logging)         <br />For Aegis support:         <br />- jdom.jar (optional, if you want to map xsd:anyType to JDOM) </em></p>
<p><em>For WS-Security support:        <br />- bcprov-jdk15.jar         <br />- xalan.jar         <br />- serializer.jar         <br />- wss4j.jar         <br />- xmlsec.jar </em></p>
<p><em>For HTTP Binding support:        <br />- jra.jar         <br />- jettison.jar (Needed for JSON services only) </em></p>
<p><em>For JAX-RS support:        <br />- abdera*         <br />- axiom*         <br />- jsr311-api.jar         <br />- jettison.jar (Needed for JSON services only) </em></p>
<p><em>For JMS transport        <br />- geronimo-jms.jar (Or the Sun equivalent)         <br />- spring-jms.jar </em></p>
<p><em>For CORBA support:        <br />- antlr.jar</em></p>
<p>If you want to use Aegis databinding which is providing by CXF then:</p>
<p>Download :<a href="http://www.jdom.org/downloads/index.html" target="_blank">jdom-1.0.jar</a></p>
<p>For Spring you can download its <a href="http://www.springsource.org/download" target="_blank">latest version say 2.5.</a></p>
</blockquote>
<p><font color="#333333"><strong>Step 2: Creating a Project</strong></font></p>
<ul>
<li><font color="#333333">Open your IDE ( I am using Eclipse) and create a Web project. Lets say with Name CXFExample. </font></li>
</ul>
<p><a href="http://lijinjoseji.files.wordpress.com/2009/06/project.jpg"><img title="Project" style="display:inline;border-width:0;" height="310" alt="Project" src="http://lijinjoseji.files.wordpress.com/2009/06/project_thumb.jpg?w=259&#038;h=310" width="259" border="0" /></a> </p>
<ul>
<li><font color="#333333">Create a package say “com.your.company.service”</font> </li>
<li><font color="#333333">Create a POJO class with a name say “Product”. And include some properties like productName etc.</font> </li>
</ul>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:99.35%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;height:393px;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> package com.your.company.service;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span> import org.apache.cxf.aegis.type.java5.IgnoreProperty;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span> <span style="color:#0000ff;">public</span> final <span style="color:#0000ff;">class</span> Product {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span>     <span style="color:#0000ff;">private</span> String itemName;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span>     <span style="color:#0000ff;">private</span> String category;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">double</span> price;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span>     <span style="color:#0000ff;">private</span> String details;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>     <span style="color:#0000ff;">public</span> Product() {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>     <span style="color:#0000ff;">public</span> Product(String itemName, String category, <span style="color:#0000ff;">double</span> price,</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>             String details) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>         <span style="color:#0000ff;">this</span>.itemName = itemName;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>         <span style="color:#0000ff;">this</span>.category = category;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>         <span style="color:#0000ff;">this</span>.price = price;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>         <span style="color:#0000ff;">this</span>.details = details;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>     <span style="color:#0000ff;">public</span> String getItemName() {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>         <span style="color:#0000ff;">return</span> itemName;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setItemName(String itemName) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>         <span style="color:#0000ff;">this</span>.itemName = itemName;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span>     <span style="color:#0000ff;">public</span> String getCategory() {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  31:</span>         <span style="color:#0000ff;">return</span> category;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  32:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  33:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  34:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setCategory(String category) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  35:</span>         <span style="color:#0000ff;">this</span>.category = category;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  36:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  37:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  38:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">double</span> getPrice() {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  39:</span>         <span style="color:#0000ff;">return</span> price;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  40:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  41:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  42:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setPrice(<span style="color:#0000ff;">double</span> price) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  43:</span>         <span style="color:#0000ff;">this</span>.price = price;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  44:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  45:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  46:</span>     @IgnoreProperty</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  47:</span>     <span style="color:#0000ff;">public</span> String getDetails() {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  48:</span>         <span style="color:#0000ff;">return</span> details;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  49:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  50:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  51:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> setDetails(String details) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  52:</span>         <span style="color:#0000ff;">this</span>.details = details;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  53:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  54:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  55:</span> }</pre>
</p></div>
</div>
<p>Note that we used one Annotation from Aegis. Its just to get some idea about that annotation. As you know Aegis is using for data binding. As the annotation denotes if we are mentioning it is not needed in the WSDL file.</p>
<ul>
<li>Creating the Service Interface </li>
</ul>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> package com.your.company.service;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span> import java.util.List;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span> import javax.jws.WebParam;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span> import javax.jws.WebService;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span> @WebService</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span> <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">interface</span> ProductService {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>     List&lt;Product&gt; getProducts();</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>     <span style="color:#0000ff;">void</span> addProduct(@WebParam(name = <span style="color:#006080;">&quot;product&quot;</span>) Product product);</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> addProducts(@WebParam(name = <span style="color:#006080;">&quot;products&quot;</span>) List&lt;Product&gt; products);</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span> }</pre>
</p></div>
</div>
<p>Here we are using @WebService annotation and @WebParam Annotations. They are <a href="http://java.sun.com/javaee/5/docs/api/javax/jws/package-summary.html">JAX-WS annotations</a>.</p>
<p>@WebService is using to denote this Interface as the Web Service Interface. So while creating WSDL file this will consider.</p>
<p>@WebParam is using to name the Arguments in the WSDL file. Default it will be like Arg0, Arg1 etc. But if we are giving some names then that will be more identifiable in the WSDL.</p>
<ul>
<li>Create the Service Implementation class </li>
</ul>
<div style="border-right:gray 1px solid;border-top:gray 1px solid;font-size:8pt;overflow:auto;border-left:gray 1px solid;width:97.5%;cursor:text;line-height:12pt;border-bottom:gray 1px solid;font-family:consolas, &#39;background-color:#f4f4f4;max-height:200px;margin:20px 0 10px;padding:4px;">
<div style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;padding:0;">
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   1:</span> package com.your.company.service;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   2:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   3:</span> import java.util.ArrayList;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   4:</span> import java.util.List;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   5:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   6:</span> import javax.jws.WebParam;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   7:</span> import javax.jws.WebService;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   8:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">   9:</span> @WebService(endpointInterface = <span style="color:#006080;">&quot;edu.web.service.ProductService&quot;</span>)</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  10:</span> <span style="color:#0000ff;">public</span> final <span style="color:#0000ff;">class</span> ProductServiceImpl implements ProductService {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  11:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  12:</span>     <span style="color:#0000ff;">public</span> List&lt;Product&gt; getProducts() {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  13:</span>         List&lt;Product&gt; products = <span style="color:#0000ff;">new</span> ArrayList&lt;Product&gt;();</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  14:</span>         products.add(<span style="color:#0000ff;">new</span> Product(<span style="color:#006080;">&quot;SpringInAction&quot;</span>, <span style="color:#006080;">&quot;Manning&quot;</span>, 200,</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  15:</span>                 <span style="color:#006080;">&quot;Book about Spring&quot;</span>));</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  16:</span>         products.add(<span style="color:#0000ff;">new</span> Product(<span style="color:#006080;">&quot;EJB3InAction&quot;</span>, <span style="color:#006080;">&quot;Manning&quot;</span>, 200,</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  17:</span>                 <span style="color:#006080;">&quot;Book about EJB3&quot;</span>));</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  18:</span>         <span style="color:#0000ff;">return</span> products;</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  19:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  20:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  21:</span>     @Override</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  22:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> addProduct(Product product) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  23:</span>         System.<span style="color:#0000ff;">out</span>.println(product);</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  24:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  25:</span>&#160; </pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  26:</span>     @Override</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  27:</span>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> addProducts(@WebParam(name = <span style="color:#006080;">&quot;products&quot;</span>) List&lt;Product&gt; products) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  28:</span>         <span style="color:#0000ff;">for</span> (Product product : products) {</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  29:</span>             System.<span style="color:#0000ff;">out</span>.println(product);</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  30:</span>         }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:white;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  31:</span>     }</pre>
<pre style="font-size:8pt;overflow:visible;width:100%;color:black;line-height:12pt;font-family:consolas, &#39;background-color:#f4f4f4;border-style:none;margin:0;padding:0;"><span style="color:#606060;">  32:</span> }</pre>
</p></div>
</div>
<p>Here we are writing the Impls of our Interface methods. <code>@WebService</code> annotation is marking this class as a web service implementation</p>
<p>In the next PART we will be discussing about the Configurations.</p>
<p><strong><u>Other related posts:</u></strong></p>
<p>1. <a href="http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/" target="_blank">Creating Web services using Apache CXF (Part 1) : The Basics.</a></p>
<p>2. <a href="http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-2-development/" target="_blank">Creating Web services using Apache CXF (Part 2) : Development</a>.</p>
<p>3. <a href="http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-3-configurations/" target="_blank">Creating Web services using Apache CXF (Part 3) : Configuration</a>.</p>
<p>4. <a href="http://lijinjoseji.wordpress.com/2009/06/11/creating-web-services-using-apache-cxf-part-4-testing/" target="_blank">Creating Web services using Apache CXF (Part 4): Testing</a>.</p>
Posted in apache, Celtix, CXF, web, webservices, Xfire  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/580/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/580/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/580/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=580&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-2-development/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>

		<media:content url="http://lijinjoseji.files.wordpress.com/2009/06/project_thumb.jpg" medium="image">
			<media:title type="html">Project</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-2-development/</feedburner:origLink></item>
		<item>
		<title>Creating Web services using Apache CXF (Part 1) : The Basics.</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/9GK3C9vgJK8/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 12:02:09 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[CXF]]></category>
		<category><![CDATA[Celtix]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Xfire]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/</guid>
		<description><![CDATA[As we discussed in the previous post, CXF is the combination of two projects: Celtix developed by IONA and XFire developed by Codehaus working together at the Apache Software Foundation.
If you want an Enterprise support&#160; for CXF then please find the following links.
Click here to Read Full Article

Posted in apache, Celtix, CXF, Spring, Spring Framework, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=578&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As we discussed in the previous post, CXF is the combination of two projects: Celtix developed by IONA and <a href="http://en.wikipedia.org/wiki/Codehaus_XFire">XFire</a> developed by Codehaus working together at the <a href="http://en.wikipedia.org/wiki/Apache_Software_Foundation">Apache Software Foundation</a>.</p>
<blockquote><p>If you want an Enterprise support&#160; for CXF then please find the following links.</p>
<p><a href="http://minddiary.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/">Click here to Read Full Article</a></p>
<p><a href="http://minddiary.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/"><img alt="" src="http://lijinjoseji.files.wordpress.com/2008/02/readfull.jpg?w=199&#038;h=52" title="Read Full Article" class="aligncenter" width="199" height="52" /></a></p>
Posted in apache, Celtix, CXF, Spring, Spring Framework, web, Web Applications, webservices, Xfire  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/578/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=578&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>

		<media:content url="http://lijinjoseji.files.wordpress.com/2008/02/readfull.jpg?w=199" medium="image">
			<media:title type="html">Read Full Article</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/06/10/creating-web-services-using-apache-cxf-part-1-the-basics/</feedburner:origLink></item>
		<item>
		<title>Apache CXF- An ultimate web service open source framework : Lets start learning…</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/pf6a1DSdqEU/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/06/10/apache-cxf-an-ultimate-web-service-open-source-framework-lets-start-learning/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 08:43:15 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[CXF]]></category>
		<category><![CDATA[Celtix]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[Xfire]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[jax-ws]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/06/10/apache-cxf-an-ultimate-web-service-open-source-framework-lets-start-learning/</guid>
		<description><![CDATA[Apache CXF is an open source services framework which is a result of the merge between the XFire and Celtix projects. CXF helps us build and develop services using JAX-WS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=577&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Apache CXF is an open source services framework which is a result of the <a href="http://xfire.codehaus.org/XFire+and+Celtix+Merge">merge between the XFire and Celtix projects</a>. CXF helps us build and develop services using JAX-WS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI.</p>
<p><a href="http://minddiary.com/2009/06/10/apache-cxf-an-ultimate-web-service-open-source-framework-lets-start-learning/">Click here to Read Full Article</a></p>
<p><a href="http://minddiary.com/2009/06/10/apache-cxf-an-ultimate-web-service-open-source-framework-lets-start-learning/"><img alt="" src="http://lijinjoseji.files.wordpress.com/2008/02/readfull.jpg?w=199&#038;h=52" title="Read Full Article" class="aligncenter" width="199" height="52" /></a></p>
Posted in apache, Celtix, CXF, jax-ws, Spring, Spring Framework, web, Web Applications, webservices, Xfire  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/577/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/577/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/577/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=577&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/06/10/apache-cxf-an-ultimate-web-service-open-source-framework-lets-start-learning/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>

		<media:content url="http://lijinjoseji.files.wordpress.com/2008/02/readfull.jpg?w=199" medium="image">
			<media:title type="html">Read Full Article</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/06/10/apache-cxf-an-ultimate-web-service-open-source-framework-lets-start-learning/</feedburner:origLink></item>
		<item>
		<title>The Second Level Cache in Hibernate : Settings and Configurations.</title>
		<link>http://feedproxy.google.com/~r/LijinsBlog/~3/curpz0rpwGE/</link>
		<comments>http://lijinjoseji.wordpress.com/2009/06/09/the-second-level-cache-in-hibernate-settings-and-configurations/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 12:35:30 +0000</pubDate>
		<dc:creator>Lijin</dc:creator>
				<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[hibernate Cache]]></category>
		<category><![CDATA[second level cache]]></category>

		<guid isPermaLink="false">http://lijinjoseji.wordpress.com/2009/06/09/the-second-level-cache-in-hibernate-settings-and-configurations/</guid>
		<description><![CDATA[A Hibernate Session is a transaction-level cache of persistent data. We can configure a cluster or JVM-level (SessionFactory-level) cache on a class-by-class and collection-by-collection basis. We can also plug in a clustered cache into Hibernate. At the time of providing cache we need to understand that when we are updating the persistence DB it will [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=568&subd=lijinjoseji&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>A Hibernate <code>Session</code> is a transaction-level cache of persistent data. We can configure a cluster or JVM-level (<code>SessionFactory</code>-level) cache on a class-by-class and collection-by-collection basis. We can also plug in a clustered cache into Hibernate. At the time of providing cache we need to understand that when we are updating the persistence DB it will not automatically reflect on Cache.</p>
<p><strong>Configuring CACHE in Hibernate</strong></p>
<p>We need to tell Hibernate that which caching implementation we need to&#160; use. This we can accomplish by specifying the name of a class that implements <code><strong>org.hibernate.cache.CacheProvider</strong></code> using the property <code><strong>hibernate.cache.provider_class</strong></code>. Hibernate comes bundled with a number of built-in integrations with open-source cache providers; additionally, we could implement your own and plug it in as outlined above. Prior to 3.2 Hibernate is defaulted to use EhCache as the default cache provider.</p>
<p><strong>To find the CACHE PROVIDERS please check this post <a href="http://lijinjoseji.wordpress.com/2009/06/09/list-of-cache-providers-in-hibernate-and-their-concurrency-support-details/" target="_blank">&lt;Click Here&gt;</a></strong></p>
<h5>Cache mappings </h5>
<p>The <code>&lt;cache&gt;</code> element of a class or collection mapping has the following form: </p>
<pre>&lt;cache
    usage=&quot;transactional|read-write|nonstrict-read-write|read-only&quot;  (1)
    region=&quot;RegionName&quot;                                              (2)
    include=&quot;all|non-lazy&quot;                                           (3)
/&gt;</pre>
<p>(1) </p>
<p><code>usage</code> (required) specifies the caching strategy: <code>transactional</code>, <code>read-write</code>, <code>nonstrict-read-write</code> or <code>read-only</code> </p>
<p>(2) </p>
<p><code>region</code> (optional, defaults to the class or collection role name) specifies the name of the second level cache region </p>
<p>(3) </p>
<p><code>include</code> (optional, defaults to <code>all</code>) <code>non-lazy</code> specifies that properties of the entity mapped with <code>lazy=&quot;true&quot;</code> may not be cached when attribute-level lazy fetching is enabled </p>
<h5>Strategy: read only </h5>
<ul>
<li>Useful for data that is <b>read frequently but never updated</b>. </li>
<li>It is <b>Simple</b> . </li>
<li>Best performer among the all.</li>
</ul>
<p>If application needs to read but never modify instances of a persistent class, a <code>read-only</code> cache may be used. This is the simplest and best performing strategy. It&#8217;s even perfectly safe for use in a cluster. </p>
<pre>&lt;class name=&quot;eg.Immutable&quot; mutable=&quot;false&quot;&gt;
    &lt;cache usage=&quot;read-only&quot;/&gt;
    ....
&lt;/class&gt;</pre>
<h5>Strategy: read/write </h5>
<ul>
<li>Used when our <b>data</b> needs to be <b>updated</b>. </li>
<li>It’s having more overhead than <b>read-only</b> caches. </li>
<li>When <b>Session.close()</b> or <b>Session.disconnect()</b> is called the transaction should be completed in an environment where JTA is no used. </li>
<li>It is never used if <b>serializable transaction isolation level</b> is required. </li>
<li>In a JTA environment, for obtaining the JTA <b>TransactionManager</b> we must specify the property<b>hibernate.transaction.manager_lookup_class</b>. </li>
<li>To use it in a <b>cluster</b> the cache implementation must support <b>locking</b>.</li>
</ul>
<p>If the application needs to update data, a <code>read-write</code> cache might be appropriate. This cache strategy should never be used if serializable transaction isolation level is required. If the cache is used in a JTA environment, you must specify the property <code>hibernate.transaction.manager_lookup_class</code>, naming a strategy for obtaining the JTA <code>TransactionManager</code>. In other environments, you should ensure that the transaction is completed when <code>Session.close()</code> or <code>Session.disconnect()</code> is called. If you wish to use this strategy in a cluster, you should ensure that the underlying cache implementation supports locking. The built-in cache providers do <em>not</em>. </p>
<pre>&lt;class name=&quot;eg.Cat&quot; .... &gt;
    &lt;cache usage=&quot;read-write&quot;/&gt;
    ....
    &lt;set name=&quot;kittens&quot; ... &gt;
        &lt;cache usage=&quot;read-write&quot;/&gt;
        ....
    &lt;/set&gt;
&lt;/class&gt;</pre>
<pre>&#160;</pre>
<h5>Strategy: nonstrict read/write </h5>
<ul>
<li>Needed if the application needs to <b>update data rarely</b>. </li>
<li>we must specify <b>hibernate.transaction.manager_lookup_class </b>to use this in a JTA environment . </li>
<li>The transaction is completed when <b>Session.close()</b> or <b>Session.disconnect()</b> is called In other environments (except JTA) .</li>
</ul>
<p>If the application only occasionally needs to update data (ie. if it is extremely unlikely that two transactions would try to update the same item simultaneously) and strict transaction isolation is not required, a <code>nonstrict-read-write</code> cache might be appropriate. If the cache is used in a JTA environment, you must specify <code>hibernate.transaction.manager_lookup_class</code>. In other environments, you should ensure that the transaction is completed when <code>Session.close()</code> or <code>Session.disconnect()</code> is called. </p>
<h5>Strategy: transactional </h5>
<ul>
<li>It supports only transactional cache providers such as <b>JBoss TreeCache</b>. </li>
<li>only used in <b>JTA environment</b>.</li>
</ul>
<p>The <code>transactional</code> cache strategy provides support for fully transactional cache providers such as JBoss TreeCache. Such a cache may only be used in a JTA environment and you must specify <code>hibernate.transaction.manager_lookup_class</code>. </p>
Posted in Hibernate, hibernate Cache, second level cache  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/lijinjoseji.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/lijinjoseji.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/lijinjoseji.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/lijinjoseji.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/lijinjoseji.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/lijinjoseji.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/lijinjoseji.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/lijinjoseji.wordpress.com/568/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/lijinjoseji.wordpress.com/568/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/lijinjoseji.wordpress.com/568/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=lijinjoseji.wordpress.com&blog=383653&post=568&subd=lijinjoseji&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://lijinjoseji.wordpress.com/2009/06/09/the-second-level-cache-in-hibernate-settings-and-configurations/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">Lijin</media:title>
		</media:content>
	<feedburner:origLink>http://lijinjoseji.wordpress.com/2009/06/09/the-second-level-cache-in-hibernate-settings-and-configurations/</feedburner:origLink></item>
	</channel>
</rss>
