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

<channel>
	<title>Techtracer &#187; Web Services</title>
	<atom:link href="http://techtracer.com/category/web-services/feed/" rel="self" type="application/rss+xml" />
	<link>http://techtracer.com</link>
	<description>Tracing the course of Web Technology</description>
	<lastBuildDate>Tue, 06 Jan 2009 12:14:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
  <link>http://techtracer.com</link>
  <url>http://techtracer.com/wp-includes/images/favicon.png</url>
  <title>Techtracer</title>
</image>
		<item>
		<title>Working With JAX-WS in JDK 1.6</title>
		<link>http://techtracer.com/2007/08/19/working-with-jax-ws-in-jdk-16/</link>
		<comments>http://techtracer.com/2007/08/19/working-with-jax-ws-in-jdk-16/#comments</comments>
		<pubDate>Sun, 19 Aug 2007 15:59:36 +0000</pubDate>
		<dc:creator>nitinpai</dc:creator>
				<category><![CDATA[Java EE]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://techtracer.com/2007/08/19/jax-ws-is-easier-with-jdk-16/</guid>
		<description><![CDATA[I had created a web service client from an online web service while learning it for the first time and then had written a tutorial on creating a client with JAX-WS and JAXP. At that time I had JDK 1.5 and JWSDP 2.0 pack for web services.
I tried today working in JDK 1.6 and to [...]]]></description>
			<content:encoded><![CDATA[<p>I had created a web service client from an online web service while learning it for the first time and then had written a tutorial on <a href="http://techtracer.com/2007/08/15/jax-ws-jaxp-tutorial-building-a-stockquote-web-service-client/">creating a client with JAX-WS and JAXP</a>. At that time I had <strong>JDK 1.5</strong> and <strong>JWSDP 2.0</strong> pack for web services.</p>
<p>I tried today working in <strong>JDK 1.6</strong> and to my surprise I found out that it comes shipped in with web services utilities which include <strong>JAX-WS 2.0, JAXB 2.0, JAXP2.0</strong>. This means a lot of ease in the development of web services for the developer. The benefits are:</p>
<ol>
<li>There is no need to separately download the <strong>JWSDP 2.0</strong> as I had mentioned in my tutorial</li>
<li>There is no need to remember all the different set of libraries which are required to be included in the classpath before your program has to run.</li>
<li>It eases out the development and saves your time.</li>
</ol>
<p><strong>Does that mean there are no Issues? </strong></p>
<p>There are some. The stubs generated in the manner, I had mentioned in the tutorial won&#8217;t work if you are working in<strong> Java 6</strong>. Because I got an error when I had opened the project Eclipse after installing JDK 1.6 which stated,</p>
<blockquote><p>java.lang.IllegalArgumentException: Expected class javax.xml.bind.annotation.XmlAccessType but found class javax.xml.bind.annotation.AccessType</p></blockquote>
<p>In order to solve this error you have to generate your stubs once again with the same command i.e <strong>wsimport </strong>but in this case you should not use the <strong>wsimport.bat</strong> which comes in JWSDP 2.0. On the contrary you have to use <strong>wsimport.exe</strong> which is found in <strong>&lt;JAVA_HOME&gt;/bin</strong> where JAVA_HOME is the installation directory for JDK 1.6. For example in my case it was,</p>
<blockquote><p>C:\Program Files\Java\jdk1.6.0_02\bin\wsimport.exe</p></blockquote>
<p>You have to remember that JAX-WS which gets shipped with JDK 1.6 is of version 2.0. The latest offering is however <a href="https://jax-ws.dev.java.net/" target="_blank">JAX-WS 2.1.2</a> which is a part of <strong>Project Metro</strong> for <strong>GlassFish</strong>.  I tried working in JAX-WS 2.1.2 but currently I think there are a lot of compatibility issues in the latest version with JDK 1.6 because I was not able to create the client in 2.1.2 in the same manner.</p>
<p>But I am happy to see my JDK 1.6 making my work easier. Hope to see more such nice features in the future.</p>
<h2>Related posts:</h2><ul><li><a href="http://techtracer.com/2006/10/16/bea-aqualogic-data-services-platform-first-glimpse/" rel="bookmark" title="Permanent Link: BEA Aqualogic Data Services Platform &#8211; First Glimpse">BEA Aqualogic Data Services Platform &#8211; First Glimpse</a></li><li><a href="http://techtracer.com/2007/08/01/j2ee-or-jee-java-5-or-java-15-is-sun-crazy/" rel="bookmark" title="Permanent Link: J2EE or JEE, Java 5 or Java 1.5 &#8211; Is SUN Crazy?">J2EE or JEE, Java 5 or Java 1.5 &#8211; Is SUN Crazy?</a></li><li><a href="http://techtracer.com/2007/01/29/scdjws-mission-accomplished/" rel="bookmark" title="Permanent Link: SCDJWS &#8211; mission accomplished">SCDJWS &#8211; mission accomplished</a></li><li><a href="http://techtracer.com/2008/03/17/key-points-for-choosing-the-best-framework/" rel="bookmark" title="Permanent Link: Key Points for Choosing the Best framework">Key Points for Choosing the Best framework</a></li><li><a href="http://techtracer.com/2007/03/12/xp-installation-the-34-minute-hiccup/" rel="bookmark" title="Permanent Link: XP Installation &#8211; The 34 minute hiccup">XP Installation &#8211; The 34 minute hiccup</a></li></ul><br /><a href="http://techtracer.com/">Techtracer.com</a> Copyright &copy; 2008<br /> ]]></content:encoded>
			<wfw:commentRss>http://techtracer.com/2007/08/19/working-with-jax-ws-in-jdk-16/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>JAX-WS + JAXP Tutorial &#8211; Building A StockQuote Web Service Client</title>
		<link>http://techtracer.com/2007/08/15/jax-ws-jaxp-tutorial-building-a-stockquote-web-service-client/</link>
		<comments>http://techtracer.com/2007/08/15/jax-ws-jaxp-tutorial-building-a-stockquote-web-service-client/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 17:24:02 +0000</pubDate>
		<dc:creator>nitinpai</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://techtracer.com/2007/08/15/jax-ws-jaxp-tutorial-building-a-stockquote-web-service-client/</guid>
		<description><![CDATA[In this tutorial you will learn how to make a standalone Web Service client using JAX-WS. JAX-WS and JAXP API together, provide an easy way to develop a web service client. This tutorial makes use of an existing online web service instead of creating one from scratch just for making a client. For this tutorial [...]]]></description>
			<content:encoded><![CDATA[<p>In this tutorial you will learn how to make a standalone Web Service client using JAX-WS. JAX-WS and JAXP API together, provide an easy way to develop a web service client. This tutorial makes use of an existing online web service instead of creating one from scratch just for making a client. For this tutorial you would need the following:</p>
<ul>
<li><strong>JWSDP 2.0</strong> pack</li>
<li><strong>JDK 1.5</strong> or above</li>
<li>The required Web Service <strong>WSDL</strong></li>
<li><strong>Eclipse</strong> 3.1 or above</li>
</ul>
<p>The procedure for creating the client have been broken down into <strong>3 easy steps</strong> which are:</p>
<ol>
<li>Creating the Stubs from <strong>WSDL</strong></li>
<li>Building the Web Service Client using <strong>JAX-WS</strong></li>
<li>Parsing the Output using <strong>JAXP</strong></li>
</ol>
<p><u><strong>JAXWS &amp; JAXP</strong></u></p>
<p><strong>JAX-WS</strong> is an API for creating as well as invoking web services. It succeeds the JAX RPC API and makes it easier by reducing the XML configurations, through the use of annotations available in Java 5. However you don&#8217;t need annotations for this tutorial.</p>
<p><strong>JAXP</strong> is a <strong>wrapper</strong> API over the legacy XML parsing API&#8217;s such as <strong>DOM</strong> and<strong> SAX</strong> and leverages their usage through its generic interfaces. JAXP is typically used in a web service which is implemented with a <strong>Document Literal </strong>style. This is because such web services return an <strong>XML document</strong> and not a simple String Value. The XML Document then has to be parsed using the JAXP API.</p>
<p>So let us begin with the tutorial.</p>
<p><u><strong>1. Creating the Stubs from WSDL</strong></u></p>
<p>For this tutorial, I am going to use the<strong> Stock Quote Service</strong> available at <a href="http://www.webservicex.net/stockquote.asmx?op=GetQuote" target="_blank">webservicex.net</a>. The web service demo shows you an XML document being returned when you enter in a stock ticker in the text box provided. The client which you will create in JAX-WS will invoke the <strong>GetQuote</strong> service and receive the same document which we will then parse using JAXP.</p>
<p>In order to invoke the GetQuote service you first need to have the <strong>stubs</strong>. The stubs can be created easily using the <strong>import.bat</strong> utility provided in the JWSDP pack. The path where you can find this utility is &lt;JWSDP_HOME&gt;/<strong>jaxws/bin. </strong>For using this utility you must set the <strong>JAXWS_HOME </strong>environment variable which points to the JAX-WS directory. For example I have set mine as:</p>
<pre lang="">
C:\tomcat50-jwsdp\jaxws
</pre>
<p>Open the command prompt and go the path &lt;JWSDP_HOME&gt;/<strong>jaxws/bin. </strong>Use the <a href="http://www.webservicex.net/stockquote.asmx?WSDL" target="_blank">WSDL path</a> of the GetQuote Web Service and type in the following command,</p>
<pre lang="">
C:\tomcat50-jwsdp\jaxws\bin>wsimport -s . http://www.webservicex.net/stockquote.
asmx?WSDL
</pre>
<p>This command generates the stubs which are required for invoking the web service, in the current directory. The  <strong>-s switch</strong> is to generate source code of the stubs. We need to use these generated classes in the client.</p>
<p>Now open <strong>Eclipse</strong> and make a new <strong>Java Project</strong>. Name it whatever you like. Next, <strong>import</strong> all the above generated classes into the project. Remember all the classes have to be in the same package as they were generated i.e <strong>net.webservicex</strong></p>
<p><u><strong>2. Building the Web Service Client using JAX-WS</strong> </u></p>
<p>Create a package <strong>com.ws.client</strong> where we will place our client code. Make a Java Class called <strong>StockQuoteClient. </strong>You would now have to import a large set of JAR&#8217;s which would be required for running the client. The JAR&#8217;s which are needed are:</p>
<ul>
<li><em>jaxws-api.jar, jaxws-rt.jar, jsr181-api.jar</em> present in  <strong>jaxws/lib</strong></li>
<li><em>jaxb-api.jar, jaxb-impl.jar  </em>present in <strong>jaxb/lib</strong></li>
<li><em>saaj-api.jar, saaj-impl.jar </em>present in <strong>saaj/lib</strong></li>
<li><em>resolver.jar, activation.jar </em>present in <strong>jwsdp-shared/lib</strong></li>
<li><em>jsr173_api.jar, sjsxp.jar </em>present in <strong>sjsxp/lib</strong></li>
<li><em>jaxp-api.jar</em> present in <strong>jaxp/lib</strong></li>
</ul>
<p>That&#8217;s too much indeed! But trust me, you wouldn&#8217;t have your web service client running without these libraries. Now write the following code inside the main method of  <strong>StockQuoteClient</strong></p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"> StockQuote service = <span style="color: #000000; font-weight: bold;">new</span> StockQuote<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 StockQuoteSoap port = service.<span style="color: #006633;">getStockQuoteSoap</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 <span style="color: #003399; font-weight: bold;">String</span> quote = port.<span style="color: #006633;">getQuote</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;INFY&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
 <span style="color: #003399; font-weight: bold;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>quote<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The code is simple. You first create a service instance of <strong>StockQuote</strong>. Then you get the <strong>port </strong>on which you want the function to be invoked. Here I have invoked the <strong>StockQuoteSoap </strong>port. </p>
<p>Once you get the port you are ready to invoke the service which is done by calling <strong>port.getQuote(&#8220;INFY&#8221;)</strong> where <strong>INFY</strong> is the stock ticker symbol for the company INFOSYS.</p>
<p>Now run this program as a <strong>Java Application </strong>in Eclipse. You would see a long running line of XML returned as a string which contains the details related to INFY stock.</p>
<p><u><strong>3. Parsing the Output using JAXP</strong></u></p>
<p>The returned XML output is undesirable since it cannot be read out easily. So now we have to use some API which would easily help us to get the required details in a nice and clean manner. This is where we would use <strong>JAXP</strong>. Now instead of printing out the output as it is, make a function <strong>parseQuote</strong> with which we will parse the XML returned.  For this, in the main method, change</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #003399; font-weight: bold;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>quote<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;">List<span style="color: #339933;">&lt;</span>String<span style="color: #339933;">&gt;</span> items = <span style="color: #000000; font-weight: bold;">new</span> ArrayList<span style="color: #339933;">&lt;</span>String<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
items.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Last&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
items.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Date&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
items.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Time&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
items.<span style="color: #006633;">add</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Change&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
parseQuote<span style="color: #009900;">&#40;</span>quote, items<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>You may be wondering what the <strong>List</strong> of items is used for. Well, instead of making the method for displaying all the information contained within the XML fragment, we would create the method more nicer, which will only display the contents of the tags actually needed. Hence we pass the tag names in a <em>List</em> as a second argument.</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #006600; font-weight: bold;">void</span> parseQuote<span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> quote, List<span style="color: #339933;">&lt;</span>String<span style="color: #339933;">&gt;</span> items<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399; font-weight: bold;">Exception</span><span style="color: #009900;">&#123;</span>	
	<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Its been made static so as to access it directly. You can either throw an Exception from the method or implement a try-catch inside the method. Use the below code inside the <strong>parseQuote</strong> method.</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;">&nbsp;
<span style="color: #003399; font-weight: bold;">DocumentBuilderFactory</span> factory = <span style="color: #003399; font-weight: bold;">DocumentBuilderFactory</span>.<span style="color: #006633;">newInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
factory.<span style="color: #006633;">setValidating</span><span style="color: #009900;">&#40;</span><span style="color: #006600; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #003399; font-weight: bold;">DocumentBuilder</span> builder = factory.<span style="color: #006633;">newDocumentBuilder</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>In the code <em>DocumentBuilderFactory </em>and <em>DocumentBuilder</em> instances are used to get hold the document which we want to parse. The document is nothing but the XML output stored in the <strong>quote</strong> object. But in order to read the string, we would require to use it as</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #003399; font-weight: bold;">Document</span> document = builder.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399; font-weight: bold;">InputSource</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399; font-weight: bold;">StringReader</span><span style="color: #009900;">&#40;</span>quote<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>and not directly. If used directly you would get a <strong>java.net.MalformedURLException</strong> exception. After getting a hold of the document we use a <a href="http://techtracer.com/2007/05/16/looping-through-collections-is-fun-in-java-6/">for in loop</a> to check which items are required to be displayed.</p>

<div class="wp_syntax"><div class="code"><pre class="java5" style="font-family:monospace;"><span style="color: #000000;  font-weight: bold;">for</span><span style="color: #009900;">&#40;</span><span style="color: #003399; font-weight: bold;">String</span> content:items<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #003399; font-weight: bold;">NodeList</span> list = document.<span style="color: #006633;">getElementsByTagName</span><span style="color: #009900;">&#40;</span>content<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003399; font-weight: bold;">Node</span> item = list.<span style="color: #006633;">item</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #003399; font-weight: bold;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span>content + <span style="color: #0000ff;">&quot; : &quot;</span> + item.<span style="color: #006633;">getTextContent</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The function to look out for is getElementsByTagName() which itself finds the tag names and gives the content within them. Remember for using this function, the tag name provided, <strong>must</strong> be any leaf element or else you would get a <strong>javax.xml.stream.XMLStreamException </strong>error.</p>
<p><u><strong>Final Words</strong></u></p>
<p>This is a very basic way in which you can build a web service client using JAX-WS and JAXP. The tutorial is aimed for getting started with these two API&#8217;s together. Further down from here, you can begin exploring in depth the wonderful features that these API&#8217;s provide.</p>
<p>You can copy paste the entire code <a href='http://techtracer.com/wp-content/uploads/2007/08/stockquoteclientjava.txt' title='StockQuoteClient.java'>provided here</a> and use directly in your application.</p>
<h2>Related posts:</h2><ul><li><a href="http://techtracer.com/2007/08/19/working-with-jax-ws-in-jdk-16/" rel="bookmark" title="Permanent Link: Working With JAX-WS in JDK 1.6">Working With JAX-WS in JDK 1.6</a></li><li><a href="http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/" rel="bookmark" title="Permanent Link: SCDJWS preparation &#8211; a kick start guide">SCDJWS preparation &#8211; a kick start guide</a></li><li><a href="http://techtracer.com/2007/03/27/ajax-frameworks-server-side-versus-client-side/" rel="bookmark" title="Permanent Link: Ajax Frameworks &#8211; Server side versus Client side">Ajax Frameworks &#8211; Server side versus Client side</a></li><li><a href="http://techtracer.com/2007/01/29/scdjws-mission-accomplished/" rel="bookmark" title="Permanent Link: SCDJWS &#8211; mission accomplished">SCDJWS &#8211; mission accomplished</a></li><li><a href="http://techtracer.com/2007/08/26/eclipse-europa-has-ruined-my-day/" rel="bookmark" title="Permanent Link: Eclipse Europa Has Ruined My Day">Eclipse Europa Has Ruined My Day</a></li></ul><br /><a href="http://techtracer.com/">Techtracer.com</a> Copyright &copy; 2008<br /> ]]></content:encoded>
			<wfw:commentRss>http://techtracer.com/2007/08/15/jax-ws-jaxp-tutorial-building-a-stockquote-web-service-client/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Annotations in POJO &#8211; a boon or a curse?</title>
		<link>http://techtracer.com/2007/04/07/annotations-in-pojo-a-boon-or-a-curse/</link>
		<comments>http://techtracer.com/2007/04/07/annotations-in-pojo-a-boon-or-a-curse/#comments</comments>
		<pubDate>Sat, 07 Apr 2007 16:58:36 +0000</pubDate>
		<dc:creator>nitinpai</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://techtracer.com/2007/04/07/annotations-in-pojo-a-boon-or-a-curse/</guid>
		<description><![CDATA[The purpose of annotations have been well put forward with the recent upgradation of EJB to EJB 3.0 and also in the web services field by JAX-WS. Annotations help in reducing the learning curve associated with these specifications by avoiding the need to learn the deployment descriptors which are necessary to properly deploy an EJB [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of annotations have been well put forward with the recent upgradation of <strong>EJB</strong> to <strong>EJB 3.0</strong> and also in the web services field by <strong>JAX-WS</strong>. Annotations help in reducing the learning curve associated with these specifications by avoiding the need to learn the deployment descriptors which are necessary to properly deploy an <strong>EJB</strong> or a <strong>JAX-WS</strong> web service respectively.</p>
<p><u><em><strong>Annotations &#8211; a boon or a curse?</strong></em></u><br />
Due to the above situation, the influence on the usage of annotations is steadily rising. It is but natural that programmers would try to do their work quickly without having to waste the time in learning the XML Schema&#8217;s required for deployment. Annotations are purposely aimed at this programmer&#8217;s dilemma. In fact when I was working in <strong>JAX RPC,</strong> I used to think as to when I would get a tool to code those ugly descriptors in an easier fashion. With annotation based web services creation in <strong>JAX-WS</strong>, half of my work is done when I put them in the <em>POJO</em> itself.</p>
<p>All of this can be attributed as a boon to the presence of annotations. But the point of worry is, whether all those annotations which are pushed in the <em>POJO</em> to do work in an easier manner are really worthwhile? What has happened to the age old technique wherein a <em>POJO</em> by nature would remain a <em>POJO</em> such that it could be used wherever required without having to change the code in future.</p>
<p><u><em><strong>Degradation of POJO&#8217;s</strong></em></u><br />
You have to remember that the ugly deployment descriptors which we swear at are the actual components in an application which give us the power of code flexibility and code reuse. They are here to make changes and configurations during runtime without having to touch the class files. But with the presence of annotations I fear that people would become slaves to them and all of the configuration code would be pushed into the <em>POJO</em>&#8217;s.</p>
<p>According to the <em>POJO</em> definition, a <em>POJO</em> doesn&#8217;t remain a <em>POJO</em> anymore, once it relies on any kind of API or framework which makes it dependent on an environment other than the <strong>JVM</strong>. <a href="http://en.wikipedia.org/wiki/Plain_Old_Java_Object">According to</a><em><a href="http://en.wikipedia.org/wiki/Plain_Old_Java_Object"> Wikipedia</a>, a</em> <em>POJO</em> should not have to,</p>
<blockquote>
<ol>
<li>extend prespecified classes</li>
<li>implement prespecified interfaces</li>
<li>contain prespecified annotations</li>
</ol>
</blockquote>
<p>An annotation may not change a <em>POJO</em>&#8217;s behavior but it makes it dependent on the environment. If you try to compile a <em>POJO</em> in your <strong>JVM</strong> it won&#8217;t get compiled. This is because an annotation also requires an environment to get translated into its specific configuration file. So the question is how would you attribute a normal <em>POJO</em> behavior to the one with annotations. They are not the same.</p>
<p><u><em><strong> The problem in using Annotations</strong></em></u><br />
A framework which makes use of the normal <em>POJO</em> without changing them would be a truly flexible framework. If we try to compare <strong>EJB 3.0</strong> with the <strong>Spring</strong> framework we would immediately come to know the difference. In <strong>EJB 3.0</strong> you declare a bean with an annotation in a <em>POJO</em> whereas in  a <strong>Spring</strong> framework an <strong>XML</strong> file is used for weaving the <em>POJO</em>&#8217;s to make a flow control or give them special functionalities.</p>
<p><strong>Nathan</strong> has stated in his <a href="http://nate-tech.blogspot.com/2005/10/are-annotated-java-classes-still-pojos.html">tech blog</a>,</p>
<blockquote><p>In conclusion, annotated objects, for the simple reason that you can&#8217;t compile them without needing external resources, are <span style="font-style: italic">not</span> truly &#8220;Plain Ordinary Java Objects.&#8221;  They have been made<span style="font-style: italic"> un-plain</span> and <span style="font-style: italic">un-ordinary</span> by their annotations.</p></blockquote>
<p>This is the same point that I am trying to make through the above comparison that annotations might be great but they make a dependency in your <em>POJO</em> functionalities. The rule of thumb in the application development domain is to <strong>always</strong> keep the business functionality away from the technicalities of the framework or any of the 3rd party API&#8217;s. And <strong>annotations do the exact opposite</strong>. How can one guarantee that the annotated <em>POJO</em>&#8217;s would be useful in another container which does not have the annotation related classes?</p>
<p><u><em><strong>A cause for worry</strong></em></u><br />
Even though the above problem exists we cannot give away with annotations, because we don&#8217;t have time time enough to learn the humongous amount of XML schema&#8217;s to make our configurations. In this case we would either require a <strong>lightweight framework</strong> which does not heavily rely on XML descriptors  like <strong>Spring</strong> as compared with those in <strong>EJB 2.1</strong>. Or the round about manner is the use the annotation only in those classes where the special functionality is to be attributed to the <em>POJO</em>. This is a similar to following patterns such as the <strong>factory</strong> or the <strong>decorator pattern</strong>.</p>
<p>But who would guarantee that all the programmers would be following such methods? Not everyone understands the depth of technology. Normally people work with the things taught to them . But if they are only taught annotations as per the current trends, it wouldn&#8217;t be much late before our age old methods to keep <em>POJO</em>&#8217;s as <em>POJO</em> would fail because with annotations, they would become dependent and later we would need something which would once again make them flexible as earlier. Doesn&#8217;t it seem like we are reinventing the wheel?</p>
<h2>Related posts:</h2><ul><li><a href="http://techtracer.com/2007/08/13/java-ee-exhaustive-yet-enchanting/" rel="bookmark" title="Permanent Link: Java EE &#8211; Exhaustive yet Enchanting">Java EE &#8211; Exhaustive yet Enchanting</a></li><li><a href="http://techtracer.com/2007/08/26/eclipse-europa-has-ruined-my-day/" rel="bookmark" title="Permanent Link: Eclipse Europa Has Ruined My Day">Eclipse Europa Has Ruined My Day</a></li><li><a href="http://techtracer.com/2007/08/15/jax-ws-jaxp-tutorial-building-a-stockquote-web-service-client/" rel="bookmark" title="Permanent Link: JAX-WS + JAXP Tutorial &#8211; Building A StockQuote Web Service Client">JAX-WS + JAXP Tutorial &#8211; Building A StockQuote Web Service Client</a></li><li><a href="http://techtracer.com/2008/03/30/designing-enterprise-applications-approaches-and-patterns/" rel="bookmark" title="Permanent Link: Designing Enterprise Applications &#8211; Approaches and Patterns">Designing Enterprise Applications &#8211; Approaches and Patterns</a></li><li><a href="http://techtracer.com/2007/04/23/inversion-of-control-for-easy-integration/" rel="bookmark" title="Permanent Link: Inversion of Control &#8211; for easy integration">Inversion of Control &#8211; for easy integration</a></li></ul><br /><a href="http://techtracer.com/">Techtracer.com</a> Copyright &copy; 2008<br /> ]]></content:encoded>
			<wfw:commentRss>http://techtracer.com/2007/04/07/annotations-in-pojo-a-boon-or-a-curse/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JSON Web Services &#8211; the XML JSON debate further ahead</title>
		<link>http://techtracer.com/2007/04/01/json-web-services-the-xml-json-debate-further-ahead/</link>
		<comments>http://techtracer.com/2007/04/01/json-web-services-the-xml-json-debate-further-ahead/#comments</comments>
		<pubDate>Sun, 01 Apr 2007 13:52:18 +0000</pubDate>
		<dc:creator>nitinpai</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://techtracer.com/2007/04/01/json-web-services-the-xml-json-debate-further-ahead/</guid>
		<description><![CDATA[I have been keeping a track of JSON (JavaScript Object Notation) versus XML for the past couple of months when AJAX came up as a big bang approach.  Arun Gupta also recounts his similar experience with the XML JSON debate and concludes,
XML is document-oriented and JSON is data-oriented. So if you want to deal [...]]]></description>
			<content:encoded><![CDATA[<p>I have been keeping a track of <a href="http://www.json.org/">JSON (JavaScript Object Notation)</a> versus <a href="http://en.wikipedia.org/wiki/XML">XML</a> for the past couple of months when <a href="http://techtracer.com/2007/03/12/the-birth-of-ajax-an-amazing-story/">AJAX</a> came up as a big bang approach.  <a href="http://blogs.sun.com/arungupta/entry/language_neutral_data_format_xml">Arun Gupta</a> also recounts his similar experience with the XML JSON debate and concludes,</p>
<blockquote><p>XML is document-oriented and JSON is data-oriented. So if you want to deal with highly structured documents that requires a complex structure, binary data, exact ordering of elements and be able to render itself then use XML. If you are focused on light-weight data exchange then JSON is the way to go.</p></blockquote>
<p>In my opinion too JSON is handy only for <strong>light weight data transfer</strong> and nothing more than that. But with more nesting of data JSON can get utterly complex than XML. With XML you can define <strong>Schemas</strong>, form standardized document structures , extend exisiting document structures or import them when needed. The <strong>namespaces</strong> concept of XML has been very well established and incorporated in today&#8217;s applications and libraries.</p>
<p><u><em><strong>XML Dominance</strong></em></u><br />
XML got more acceptance due to the already well established markup languages like HTML. Due to <a href="http://www.w3.org/XML/">standardization by W3C</a> it got quickly incorporated into the big vendors tools. Even a well documented JSP is purely XML. The main advantage of XML success is the XML Schema defintion language (XSD) which has given rise to numerous other standards like <a href="http://en.wikipedia.org/wiki/SOAP">SOAP</a>, <a href="http://en.wikipedia.org/wiki/Web_Services_Description_Language">WSDL</a> etc. It is a very <strong>flexible</strong> and <strong>extensible</strong> language.</p>
<p>If you look behind the scenes a bit, XML has been reigning from the past and its usage in the industry has become massive. You might not be aware but all the big applications use XML either for storage, transfer, presentation or configuration of data and also meta data. MS SQL uses XML to transfer data from one database to other. MS WORD uses XML to provide formatting of user input content in the documents.</p>
<p><u><em><strong>JSON- Some Facts</strong></em></u><br />
Coming back to JSON, the main fact which goes against JSON is<strong> it is not standardized</strong>. But now if JSON wants to establish its presence then the only field in my opinion would be <strong>SOA web services and AJAX</strong> where, it has received a lot of attention. Lately the debate on using web services with JSON has started. XML being heavy puts somewhat a hindrance on the acceptance of web services since the network infrastructure needs to get upgraded to get quicker adoption of XML RPC web services. With JSON, if web services give a higher throughput then it might be time to cash upon its acceptance for data transfer. Alexander writes about <a href="http://myarch.com/json-pros-and-cons">JSON pros and cons</a> in his blog <em>MyArch</em>,</p>
<blockquote><p>One of the keys to SOA success is that it should be easy to consume a service, i.e., the entry barrier for service consumers must be low to support &#8220;grass root&#8221; SOA adoption. While a top-down SOA effort may succeed, it will certainly take longer than bottom-up (&#8220;grass-root&#8221;) approach when developers are able to consume services as they see fit. AJAX/JSON fits this bill perfectly &#8211; it is easily understood by developers and it does not require any Web services -specific tools or infrastructure.So overall I&#8217;m pretty enthusiastic about JSON.</p></blockquote>
<p><u><em><strong>Advantages of JSON </strong></em></u><br />
The advantage of using JSON instead of XML is in the inheritent quality of data structuring in JSON. JSON is more closer to being a <span class="tooltip" title="header=[HashMap] body=[An object which consists of name-value pair of data]">HashMap</span> as in java or an <span class="tooltip" title="header=[Associative Array] body=[An array which uses string values instead of numbers as index]">associative array</span> in some other languages like <a href="http://www.php.net">PHP</a>. Hence it does not require parsing libraries in an application as XML does. The time spent however, on parsing XML into the native language, is not so much significant considering the fast processing power of machines today.</p>
<p>The comparison of XML and JSON lies more on the <strong>network bandwidth</strong> aspect. JSON can take almost <strong>half of the bandwidth</strong> as XML for transferring the same data. It can achieve the same throughput as passing simple objects in the network in a distributed computing environment.</p>
<blockquote></blockquote>
<p><u><em><strong>JSON Web Services?</strong></em></u><br />
It would be interesting to see how would a SOAP message with JSON look like. You have to remember that WSDL is an extensible language and till date only <strong>HTTP Bindings</strong> and <strong>SOAP Bindings</strong> have been defined for it. It wont be long before we see <strong>JSON Bindings</strong> coming into the WSDL documents.  Who would not want a quick data transfer while using web services into the application?</p>
<p>AJAX with JSON has got accepted well since JavaScript has the inbuilt capability to handle JSON data and if JSON web services start getting acceptance it might get well flourished to reach the popularity charts as XML did. Is the web service industry looking for a paradigm shift or are we just building a castle in the air?</p>
<h2>Related posts:</h2><ul><li><a href="http://techtracer.com/2006/10/16/bea-aqualogic-data-services-platform-first-glimpse/" rel="bookmark" title="Permanent Link: BEA Aqualogic Data Services Platform &#8211; First Glimpse">BEA Aqualogic Data Services Platform &#8211; First Glimpse</a></li><li><a href="http://techtracer.com/2007/04/09/web-and-desktop-apps-the-3rd-world-war/" rel="bookmark" title="Permanent Link: Web and Desktop Apps &#8211; the 3rd World War!">Web and Desktop Apps &#8211; the 3rd World War!</a></li><li><a href="http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/" rel="bookmark" title="Permanent Link: SCDJWS preparation &#8211; a kick start guide">SCDJWS preparation &#8211; a kick start guide</a></li><li><a href="http://techtracer.com/2007/03/17/scdjws-study-material-and-resources-the-most-searched-thing/" rel="bookmark" title="Permanent Link: SCDJWS study material and resources &#8211; The most searched thing">SCDJWS study material and resources &#8211; The most searched thing</a></li><li><a href="http://techtracer.com/2007/08/19/working-with-jax-ws-in-jdk-16/" rel="bookmark" title="Permanent Link: Working With JAX-WS in JDK 1.6">Working With JAX-WS in JDK 1.6</a></li></ul><br /><a href="http://techtracer.com/">Techtracer.com</a> Copyright &copy; 2008<br /> ]]></content:encoded>
			<wfw:commentRss>http://techtracer.com/2007/04/01/json-web-services-the-xml-json-debate-further-ahead/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>SCDJWS mock tests and help &#8211; tried and tested</title>
		<link>http://techtracer.com/2007/03/19/scdjws-mock-tests-and-help-tried-and-tested/</link>
		<comments>http://techtracer.com/2007/03/19/scdjws-mock-tests-and-help-tried-and-tested/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 08:06:47 +0000</pubDate>
		<dc:creator>nitinpai</dc:creator>
				<category><![CDATA[Java EE]]></category>
		<category><![CDATA[SCDJWS]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://techtracer.com/2007/03/19/scdjws-mock-tests-and-help-tried-and-tested/</guid>
		<description><![CDATA[Before the actual exam it is always a better thing to give some mock tests to get a feel of how to prepare for the final exam and also to find out the weak points and to do a revision of the course material for them. You would be excited to know that there are [...]]]></description>
			<content:encoded><![CDATA[<p>Before the actual exam it is always a better thing to give some mock tests to get a feel of how to prepare for the final exam and also to find out the weak points and to do a revision of the course material for them. You would be excited to know that there are in fact a couple of nice mock tests for <strong>SCDJWS</strong>. The ones I have tried and would advice include the following:</p>
<p><strong><br />
</strong>1.<strong> </strong><a href="http://www.whizlabs.com/scdjws/scdjws.html">Whizlabs Test Simulator</a>:<br />
This is a good simulator which gives a feel of the real exam. But you should remember that this simulator is <strong>more tough</strong> than the actual exam. You would not fare well in this since it includes minute depths of the topics. But you shouldn&#8217;t feel that you are not prepared. Its the actual the other way round. If you do manage to get through this with a good score then you should be confident enough to pass the real one with flying colors. <a href="http://www.whizlabs.com/scdjws/scdjws.html"><br />
</a></p>
<p><strong>Whizlabs isnt a free product</strong>. It costs around <strong>$21</strong> and proves its worth in making you strong in the overall area of web services. If you want to try it out before purchasing then Whizlabs comes with a <strong>mini demo exam</strong> for free. It has a fixed set of questions. <a href="http://www.xyzws.com/scdjws.do?cat=scdjws&amp;smenu=MOCK"></a></p>
<p>2. <a href="http://www.xyzws.com/scdjws.do?cat=scdjws&amp;smenu=MOCK">xyzws.com</a> &#8211; If you are in pocket crunching situtation the xyzws guys are to the rescue. They provide an <strong>online mock exam</strong> and its completely<strong> free</strong>. You have to register in their site and you can give as many times the mock test as desired. One more advantage of this mock is that there are about <strong>200 questions</strong> which are chosen in a <strong>random</strong> order everytime you take this test. So don&#8217;t be surprised to see a new question even though you are repeating the test. After submission an <strong>explanation is provided</strong> for each question and the options for it and also a link is provided in case you want to clarify any doubt. Seriuosly, without this test I wouldnt have felt confident any more. It is quiet a balanced test and represents the same depth as the actual exam but beware, the same question may or may not be there in the actual exam. I had got only 3-4 questions from this test in the actual exam.</p>
<p>3. <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi">JAVARANCH Forums</a> : You often come across a series of confusions when you begin your journey in the web services arena and in particular, with SCDJWS. So is there anybody to help you out? Of course there are many and they are all united in a single place. The name of the place is . This is a friendly place for any sort of discussions you might like to have not only in web services but also in any field of J2EE and Java. You are given prompt replies to solve your queries and also they will share a drink in your name once you clear the test!<a href="http://techtracer.com/category/scdjws/"></a></p>
<p>4.<a href="http://techtracer.com/category/scdjws/">Techtracer</a>- else why would you have come here?<br />
Techtracer will always keep a trace of the web services area since it is hip and happening and also would keep updating the information on the topics related to the SCDJWS exam.  More information is coming up. So bookmark this right now!</p>
<h2>Related posts:</h2><ul><li><a href="http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/" rel="bookmark" title="Permanent Link: SCDJWS preparation &#8211; a kick start guide">SCDJWS preparation &#8211; a kick start guide</a></li><li><a href="http://techtracer.com/2007/03/17/scdjws-study-material-and-resources-the-most-searched-thing/" rel="bookmark" title="Permanent Link: SCDJWS study material and resources &#8211; The most searched thing">SCDJWS study material and resources &#8211; The most searched thing</a></li><li><a href="http://techtracer.com/2007/07/10/scwcd-the-3-steps-to-success/" rel="bookmark" title="Permanent Link: SCWCD &#8211; The 3 Steps to Success!">SCWCD &#8211; The 3 Steps to Success!</a></li><li><a href="http://techtracer.com/2007/01/29/scdjws-mission-accomplished/" rel="bookmark" title="Permanent Link: SCDJWS &#8211; mission accomplished">SCDJWS &#8211; mission accomplished</a></li><li><a href="http://techtracer.com/2007/07/09/scwcd-mission-accomplished-2/" rel="bookmark" title="Permanent Link: SCWCD &#8211; Mission Accomplished 2">SCWCD &#8211; Mission Accomplished 2</a></li></ul><br /><a href="http://techtracer.com/">Techtracer.com</a> Copyright &copy; 2008<br /> ]]></content:encoded>
			<wfw:commentRss>http://techtracer.com/2007/03/19/scdjws-mock-tests-and-help-tried-and-tested/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>SCDJWS study material and resources &#8211; The most searched thing</title>
		<link>http://techtracer.com/2007/03/17/scdjws-study-material-and-resources-the-most-searched-thing/</link>
		<comments>http://techtracer.com/2007/03/17/scdjws-study-material-and-resources-the-most-searched-thing/#comments</comments>
		<pubDate>Sat, 17 Mar 2007 17:52:39 +0000</pubDate>
		<dc:creator>nitinpai</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[SCDJWS]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://techtracer.com/2007/03/17/scdjws-study-material-and-resources-the-most-searched-thing/</guid>
		<description><![CDATA[Where do I learn from for SCDJWS? Its a good question and probably the best question. In the arena of SCDJWS you should mark my words, you would never go through with a single source of material in your hand. Well its not to scare you though, its just a matter of fact. The vast [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Where do I learn from for SCDJWS?</strong> Its a good question and probably the best question. In the arena of SCDJWS you should mark my words, you would never go through with a single source of material in your hand. Well its not to scare you though, its just a matter of fact. The vast scope of SCDJWS makes you learn from various sources. I have told you about how to get a <a href="http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/">kick start in preparing for SCDJWS</a>, but haven&#8217;t yet mentioned from where you should prepare. It was a whole new section in itself and requires a detailed information. You don&#8217;t have to fret because Ill give you the thing you crave for. The material of course. Not in a bundled form but a set of links which would see you through in flying colors in the final test.</p>
<p>The resources which I have considered for clearing SCDJWS are:<br />
1. <a href="http://www.amazon.com/J2EE-Web-Services-Richard-Monson-Haefel/dp/0321146182">J2EE web wservices, by Richard Monson Haefel (RMH)</a> &#8211; Its the bible.</p>
<p><img src="http://techtracer.com/wp-content/uploads/2007/03/j2ee-web-services-richard-moson-haefel.jpg" alt="j2ee-web-services-richard-moson-haefel.jpg" style="margin: 5px; float: left" />Excellently written, simple language, indication of BP 1.0 in places where required and excellent code snippets for a good practice. It helps in studying the all the standards used in web services and also all the API&#8217;s in <strong>JWSDP 1.6 pack</strong> on which the certification is based on(<strong>except JAXB, Web services Security, Architecture Design, Patterns and Security</strong>).</p>
<p>2. <a href="http://www.xyzws.com/scdjws.do?cat=scdjws">www.xyzws.com</a> &#8211; It is a very good online resource which provides a nice and detailed information on all the aspects concerned with SCDJWS. Of course, you will refer RMH for most of the things, but if you want to read the same things from a second resource , this is the one. The additional things which you will find here not covered in RMH are <strong>JAXB and Web services Security</strong>. Still you won&#8217;t find Architecture design concepts and patterns.</p>
<p>3. <a href="http://java.sun.com/blueprints/guidelines/designing_webservices/html/webservdesign.html#1089711">J2EE Blueprints (Service Endpoint Design)</a> &#8211; The blueprints are a good and provided from those who make the certifications i.e <strong>Sun Micro systems</strong>. They are available in <strong>pdf format and online version</strong> as well. But as they are used for production environment, they are vast and boring if you read them in entirety. But if you are keeping in mind the SCDJWS objective and have gone through the above, then you don&#8217;t have to go through everything. The only aspect which was missing in the above two resource was <strong>Service Endpoint Design (Architecture Design). </strong>Yes, you should only read this one chapter because it neatly explains you about the layers in a web service environment. That should help in building the architect within you!</p>
<p>4. <a href="http://www.ws-i.org/Profiles/BasicProfile-1.0.html">WS-I Basic Profile 1.0 (BP) </a>- read it entirely for the issues and their corresponding solutions. You would come across the references of BP in RMH in most of the cases. But you won&#8217;t probably remember those at once and not all are mentioned in RMH. So glance over all the BP points because it is not only concise but is actually interesting to read. Many people feel bored to read a lengthy page of specifications, but BP is completely different. If you have worked in a web services then reading BP will make you feel as it is some cheat sheet or hacks to make your work easier and better. It is nothing but solutions to commonly faced problems which involve making web services efficient, inter operable and using a combination of open standards of web services in the right manner.</p>
<p>2. <a href="http://www.java.boot.by/wsd-guide/">java.boot.by</a> &#8211; Finally in the last week of the actual exam, you would probably be exhausted with the whole gamut of reading you did. So it is just not advisable to revise them again if you hadn&#8217;t made notes of important points and code snippents. Well its a good point when you can refer to someone else&#8217;s notes and which have been properly revised and used by many to pass the exam. These notes are from <strong>Mikalai Zaiken</strong>! They are the ultimate notes when it comes to revising your entire process. RMH does not include patterns used in web services, so it is advisable to prepare from these notes since they are very precise and cover almost all the aspects which will be required for SCDJWS in a rather point to point terms. So a final day revision would be best done through Mikalai&#8217;s notes.</p>
<p><em><u><strong>Coming up</strong></u> &#8211; Need a list mock tests or help?</em></p>
<h2>Related posts:</h2><ul><li><a href="http://techtracer.com/2007/03/19/scdjws-mock-tests-and-help-tried-and-tested/" rel="bookmark" title="Permanent Link: SCDJWS mock tests and help &#8211; tried and tested">SCDJWS mock tests and help &#8211; tried and tested</a></li><li><a href="http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/" rel="bookmark" title="Permanent Link: SCDJWS preparation &#8211; a kick start guide">SCDJWS preparation &#8211; a kick start guide</a></li><li><a href="http://techtracer.com/2007/01/29/scdjws-mission-accomplished/" rel="bookmark" title="Permanent Link: SCDJWS &#8211; mission accomplished">SCDJWS &#8211; mission accomplished</a></li><li><a href="http://techtracer.com/2007/07/09/scwcd-mission-accomplished-2/" rel="bookmark" title="Permanent Link: SCWCD &#8211; Mission Accomplished 2">SCWCD &#8211; Mission Accomplished 2</a></li><li><a href="http://techtracer.com/2007/07/10/scwcd-the-3-steps-to-success/" rel="bookmark" title="Permanent Link: SCWCD &#8211; The 3 Steps to Success!">SCWCD &#8211; The 3 Steps to Success!</a></li></ul><br /><a href="http://techtracer.com/">Techtracer.com</a> Copyright &copy; 2008<br /> ]]></content:encoded>
			<wfw:commentRss>http://techtracer.com/2007/03/17/scdjws-study-material-and-resources-the-most-searched-thing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SCDJWS preparation &#8211; a kick start guide</title>
		<link>http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/</link>
		<comments>http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/#comments</comments>
		<pubDate>Thu, 15 Mar 2007 10:09:57 +0000</pubDate>
		<dc:creator>nitinpai</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Java EE]]></category>
		<category><![CDATA[SCDJWS]]></category>
		<category><![CDATA[Web Services]]></category>

		<guid isPermaLink="false">http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/</guid>
		<description><![CDATA[If you are looking for getting started with preparing for SCDJWS (Sun Certified Developer for Java Web Services) certification then its very normal that you will be stuck on the material required for it. SCDJWS in nature is very vast in its scope. So you have to be very careful in choosing the appropriate resources. [...]]]></description>
			<content:encoded><![CDATA[<p>If you are looking for getting started with preparing for <a href="http://www.sun.com/training/certification/java/scdjws.xml">SCDJWS</a><strong> (Sun Certified Developer for Java Web Services)</strong> certification then its very normal that you will be stuck on the material required for it. SCDJWS in nature is very vast in its scope. So you have to be very careful in choosing the appropriate resources. There are many varied implementations on the usage of the API&#8217;s which help you implement J2EE web services but you have to remember one thing. You are giving the <strong>SUN certification</strong>, so its but obvious that you have to use the API&#8217;s that SUN provides for creating the J2EE web services. There are many different API versions of the same J2EE web services specifications like those from <strong>Apache, BEA, IBM</strong>, but since the implementations can be somewhat different from each other, you always have to study the core API&#8217;s provided by SUN. This will help you avoid confusion. Moreover, studying SUN API&#8217;s is more beneficial since they are present in any vendor implementation. The vice versa is not true.</p>
<p><em><strong>First Step &#8211; Getting Started.</strong></em><br />
The first and the foremost thing you have to do before you can get started with the preparation is to learn the W3C standards which prepare the foundation for implementing the web services. They are:<br />
1. <strong>XML 1.0</strong> &#8211; for representing data<br />
2. <strong>XSD 1.0</strong> &#8211; structure for the data<br />
3. <strong>SOAP 1.1</strong> &#8211; protocol to transfer the data<br />
4. <strong>WSDL 1.1</strong> &#8211; contract for the service access<br />
5. <strong>UDDI 2.0</strong> &#8211; registry for your listing services</p>
<p>Of course they might be too overwhelming to start with rather than learning the API&#8217;s but remember, getting acquainted with the standards will make your half job done in the preparation. Once you get to know the standards learning the API&#8217;s will be much more easier than trying them out in the first place.</p>
<p><em><strong>Second step &#8211; Making a mark</strong></em><br />
The second step is the most fascinating one where you will be learning about the API&#8217;s to create the web services. You will be requiring the <a href="http://java.sun.com/webservices/docs/1.6/ReleaseNotes.html">SUN JWSDP 1.6 pack</a> (latest is <strong>2.0</strong>, but the test refers to 1.6) which includes the following API&#8217;s<br />
1. <strong>JAX-RPC</strong> &#8211; for creating a web service and its WSDL or its client<br />
2. <strong>SAAJ</strong> &#8211; for handling of SOAP messages<br />
3.<strong> JAXP</strong> &#8211; for parsing/ transforming XML data<br />
4. <strong>JAXB </strong>- for advanced handling of XML and XSD<br />
5.<strong> JAXR</strong> &#8211; for inquiring and communicating with UDDI</p>
<p>It would be beneficial if you follow the order mentioned here in learning the API&#8217;s. Its not a mandate however, just a comfortable approach to cover all the API&#8217;s without having to get entangled in learning them all at the same time.</p>
<p><em><strong>Third Step &#8211; Rising from the fall</strong></em><br />
The third step is tightly bound to the second step. First let me tell you what this steps includes learning.<br />
1. <strong>Basic Profile 1.0</strong> &#8211; for solving your headaches<br />
2. <strong>J2EE blueprints</strong> (Service Endpoint Design) &#8211; for giving you relief from the pain<br />
3. <strong>Web service Security</strong> &#8211; to protect your services</p>
<p>Well these things actually are meant to be learnt before you actually do a SOA web service project but I am telling you to learn them after the API&#8217;s. Why? because it will embed in your minds the problems which you might encounter in the future if you didn&#8217;t have the Basic profile and the blueprints at all. You might call it reinventing the wheel. Why should you learn them after facing problems when they are present to solve them. Well, the first thing is that learning them in theory is boring and you wouldn&#8217;t even know what they mean in practicality if you never had been in the mentioned situation. Well its just like you learn to avoid slippery places only after you know what might happen if you fall. After learning to implement web services and use the API&#8217;s you would really appreciate why the Basic Profile and Blueprints have been created.</p>
<p><em><strong>Fourth and final step &#8211; Taking the plunge</strong></em><br />
So now that you armed with the power to defeat and destroy.. umm..err.. give the test, you might as well get some first aid in the form of mock tests. They help you point out which area you might have been neglecting all the while and also brush up and strengthen the stuff that you have learnt. Give mock test 2 to 3 times so that you have to aim for the 100% when you are giving it for the 3rd time. A 90+ score in the 3rd time will indicate that you are almost ready for the actual test. Well, there&#8217;s no stopping you from scoring a 90+ in the first and second time, but from an average point of view, I am indicating that you might require 3 times. I did!</p>
<p>And finally <strong>BEST OF LUCK</strong> for the grand finale- the SCDJWS test! It would be truly a moment to rejoice when you clear the exam as I have felt. Just like you won a big war!</p>
<p><em><strong> <u>Coming up</u></strong>  : Materials to use for SCDJWS preparation</em></p>
<h2>Related posts:</h2><ul><li><a href="http://techtracer.com/2007/03/17/scdjws-study-material-and-resources-the-most-searched-thing/" rel="bookmark" title="Permanent Link: SCDJWS study material and resources &#8211; The most searched thing">SCDJWS study material and resources &#8211; The most searched thing</a></li><li><a href="http://techtracer.com/2007/03/19/scdjws-mock-tests-and-help-tried-and-tested/" rel="bookmark" title="Permanent Link: SCDJWS mock tests and help &#8211; tried and tested">SCDJWS mock tests and help &#8211; tried and tested</a></li><li><a href="http://techtracer.com/2007/01/29/scdjws-mission-accomplished/" rel="bookmark" title="Permanent Link: SCDJWS &#8211; mission accomplished">SCDJWS &#8211; mission accomplished</a></li><li><a href="http://techtracer.com/2007/07/09/scwcd-mission-accomplished-2/" rel="bookmark" title="Permanent Link: SCWCD &#8211; Mission Accomplished 2">SCWCD &#8211; Mission Accomplished 2</a></li><li><a href="http://techtracer.com/2007/07/10/scwcd-the-3-steps-to-success/" rel="bookmark" title="Permanent Link: SCWCD &#8211; The 3 Steps to Success!">SCWCD &#8211; The 3 Steps to Success!</a></li></ul><br /><a href="http://techtracer.com/">Techtracer.com</a> Copyright &copy; 2008<br /> ]]></content:encoded>
			<wfw:commentRss>http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>BEA Aqualogic Data Services Platform &#8211; First Glimpse</title>
		<link>http://techtracer.com/2006/10/16/bea-aqualogic-data-services-platform-first-glimpse/</link>
		<comments>http://techtracer.com/2006/10/16/bea-aqualogic-data-services-platform-first-glimpse/#comments</comments>
		<pubDate>Mon, 16 Oct 2006 04:52:23 +0000</pubDate>
		<dc:creator>nitinpai</dc:creator>
				<category><![CDATA[Web Services]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://techtracer.com/?p=270</guid>
		<description><![CDATA[Working on the BEA Aqualogic Data Services Platform 2.5 (AL-DSP) over the BEA Weblogic 8.1 has widened my imagination of web technology to even more higher levels. It has given me a confidence that I can now say the future of the newly emerging technologies is simply unimaginable. In the earlier few months of this [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Working on the <a href="http://www.bea.com/framework.jsp?CNT=index.htm&amp;FP=/content/products/aqualogic/data_services/">BEA Aqualogic Data Services Platform 2.5</a> (AL-DSP) over the <a href="http://dev2dev.bea.com/devoffering/index.jsp">BEA Weblogic 8.1</a> has widened my imagination of web technology to even more higher levels. It has given me a confidence that I can now say the future of the newly emerging technologies is simply unimaginable. In the earlier few months of this year I was working on <a href="http://java.sun.com/webservices/jaxb/">JAXB</a> which was a one of a kind object oriented XML parser provided in the <a href="http://java.sun.com/webservices/downloads/webservicespack.html">JWSDP 2.0</a> J2EE web services packages by Sun Microsystems. It made me aware how to go about working with <strong>XML</strong>, <strong>XSD</strong> and some amount of <strong>XPATH</strong>.</p>
<p align="justify">BEA AL-DSP 2.5 takes it more further ahead by leaps and bounds utilising all the power of XML communication and combines the usage of <a href="http://en.wikipedia.org/wiki/Xml">XML</a>, <a href="http://en.wikipedia.org/wiki/xsd">XSD</a>, <a href="http://en.wikipedia.org/wiki/Xpath">XPATH</a> and <a href="http://en.wikipedia.org/wiki/Xquery">XQUERY</a> to give a complete package which can be used as a whole new kind of abstraction layer which can amalgamate data from different kind of data sources. The data sources which can be used to collect data in DSP is currently from <strong>JDBC sources</strong>, <strong>Web services</strong>, <strong>JAVA functions</strong>, <strong>XML data</strong> and <strong>Delimited (<a href="http://en.wikipedia.org/wiki/Comma-separated_values">CSV</a>) formatted data</strong>.</p>
<p>A layer of DSP site above the underlying different physical sources and all the developer needs to do is to configure all the different sources into the DSP Workshop IDE and then define the unified data which he wants to retrive and then create functions by which the required elements have to be mapped to the underlying elements. DSP does the complex job of validation, authentication upto the element level and gives a collective unified data which further can provide in the form of plain XML or in the form of web service. The knowledge of XQuery is required in case you want to customize the data returned. Although I have not been able to get the submit function of web service created from the data services working making a read only web service is the game of a single right click !!!</p>
<p>DSP even provides some <strong>remarkable features of modelling</strong> of the data coming from different sources, generating <strong>crystal reports </strong>with graphical representation and even direct transfer of data to the <a href="http://www.bea.com/framework.jsp?CNT=index.htm&amp;FP=/content/products/aqualogic/service_bus/">BEA Aqualogic Service Bus 2.5</a> which is an ESB for routing mechanisms. Working with DSP has opened my eyes to a whole new world of information transfer. Gone are the days when I needed to create a JDBC connection and code for the data retrieval process. This is surely fun and extremely fruitfull for a large application having distributed and different data resources.</p>
<h2>Related posts:</h2><ul><li><a href="http://techtracer.com/2008/05/11/bea-dev2dev-techdays-an-experience/" rel="bookmark" title="Permanent Link: BEA Dev2Dev TechDays &#8211; An Experience">BEA Dev2Dev TechDays &#8211; An Experience</a></li><li><a href="http://techtracer.com/2008/01/23/effects-of-oracle-bea-acquisition/" rel="bookmark" title="Permanent Link: Effects of Oracle BEA Acquisition">Effects of Oracle BEA Acquisition</a></li><li><a href="http://techtracer.com/author/" rel="bookmark" title="Permanent Link: Author">Author</a></li><li><a href="http://techtracer.com/2007/04/01/json-web-services-the-xml-json-debate-further-ahead/" rel="bookmark" title="Permanent Link: JSON Web Services &#8211; the XML JSON debate further ahead">JSON Web Services &#8211; the XML JSON debate further ahead</a></li><li><a href="http://techtracer.com/2007/03/15/scdjws-preparation-a-kick-start-guide/" rel="bookmark" title="Permanent Link: SCDJWS preparation &#8211; a kick start guide">SCDJWS preparation &#8211; a kick start guide</a></li></ul><br /><a href="http://techtracer.com/">Techtracer.com</a> Copyright &copy; 2008<br /> ]]></content:encoded>
			<wfw:commentRss>http://techtracer.com/2006/10/16/bea-aqualogic-data-services-platform-first-glimpse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
