<?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>indiWiz.com &#187; webservice</title>
	<atom:link href="http://indiwiz.com/tag/webservice/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiwiz.com</link>
	<description>Subhash&#039;s Tech Log</description>
	<lastBuildDate>Wed, 03 Mar 2010 13:24:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Accessing RESTful WebServices with Prototype.js</title>
		<link>http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/</link>
		<comments>http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 07:30:14 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=396</guid>
		<description><![CDATA[We can make Ajax requests using Prototype.js (version 1.6.0.3) thus: var url = ...; new Ajax.Request( url, { method:'DELETE', onComplete:function doMessage(response){ alert(response.status); } }); While working on this code, we found out that the method parameter accepted only GET or POST requests. When we give any other request type like DELETE or PUT, the Prototype.js [...]]]></description>
			<content:encoded><![CDATA[<p>We can make Ajax requests using <a href="http://www.prototypejs.org/">Prototype.js</a> (version 1.6.0.3) thus:</p>
<pre class="brush: jscript;">
var url = ...;
new Ajax.Request(
            url,
            {
               method:'DELETE',
               onComplete:function doMessage(response){
                   alert(response.status);
               }
            });
</pre>
<p>While working on this code, we found out that the <tt>method</tt> parameter accepted only GET or POST requests. When we give any other request type like DELETE or PUT, the Prototype.js library converted the request to POST.</p>
<p><a href="http://www.linkedin.com/in/arunjeganath">Arun Jeganath</a> found <a href="https://prototype.lighthouseapp.com/projects/8886/tickets/289-allow-put-delete-and-other-http-methods-on-ajax-requests">this post</a> where the same issue is discussed. The problem was solved when we commented these lines from the Prototype.js code:</p>
<pre>
      if (!['get', 'post'].include(this.method)) {
        //simulate other verbs over post
        params['_method'] = this.method;
        this.method = 'post';
      }
</pre>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/&amp;title=Accessing+RESTful+WebServices+with+Prototype.js" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/&amp;title=Accessing+RESTful+WebServices+with+Prototype.js" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/&amp;title=Accessing+RESTful+WebServices+with+Prototype.js&amp;desc=We%20can%20make%20Ajax%20requests%20using%20Prototype.js%20%28version%201.6.0.3%29%20thus%3A%0D%0A%0D%0A%5Bsourcecode%20language%3D%22javascript%22%5D%0D%0Avar%20url%20%3D%20...%3B%0D%0Anew%20Ajax.Request%28%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20url%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20method%3A%27DELETE%27%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20onComplete%3Afunction%20doMessage%28response%29%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alert%28response." rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/&amp;t=Accessing+RESTful+WebServices+with+Prototype.js" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/&amp;title=Accessing+RESTful+WebServices+with+Prototype.js&amp;summary=We%20can%20make%20Ajax%20requests%20using%20Prototype.js%20%28version%201.6.0.3%29%20thus%3A%0D%0A%0D%0A%5Bsourcecode%20language%3D%22javascript%22%5D%0D%0Avar%20url%20%3D%20...%3B%0D%0Anew%20Ajax.Request%28%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20url%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20method%3A%27DELETE%27%2C%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20onComplete%3Afunction%20doMessage%28response%29%7B%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20alert%28response.&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/&amp;title=Accessing+RESTful+WebServices+with+Prototype.js" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/07/22/accessing-restful-webservices-with-prototype-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WebService Client in JAX-WS (Java 6 and above)</title>
		<link>http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/</link>
		<comments>http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 12:40:50 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jax-ws]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=114</guid>
		<description><![CDATA[Given a WSDL URL, you may generate the Java client classes using the JDK provided tool wsimport. The basic usage: $ wsimport &#60;wsdl_url&#62; The common command-line parameters supported by this tool: -p specifies the target package -d folder where generated class files are placed Share this on del.icio.us Digg this! Post this on Diigo Share [...]]]></description>
			<content:encoded><![CDATA[<p>Given a WSDL URL, you may generate the Java client classes using the JDK provided tool <tt>wsimport</tt>. The basic usage:</p>
<pre>
$ wsimport &lt;wsdl_url&gt;
</pre>
<p>The common command-line parameters supported by this tool:</p>
<table border="0" cellpadding="10" cellspacing="5">
<tr>
<td><tt>-p</tt></td>
<td>specifies the target package</td>
</tr>
<tr>
<td><tt>-d</tt></td>
<td>folder where generated class files are placed</td>
</tr>
</table>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/&amp;title=WebService+Client+in+JAX-WS+%28Java+6+and+above%29" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/&amp;title=WebService+Client+in+JAX-WS+%28Java+6+and+above%29" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/&amp;title=WebService+Client+in+JAX-WS+%28Java+6+and+above%29&amp;desc=Given%20a%20WSDL%20URL%2C%20you%20may%20generate%20the%20Java%20client%20classes%20using%20the%20JDK%20provided%20tool%20wsimport.%20The%20basic%20usage%3A%0A%0A%0A%24%20wsimport%20%26lt%3Bwsdl_url%26gt%3B%0A%0A%0AThe%20common%20command-line%20parameters%20supported%20by%20this%20tool%3A%0A%0A%0A%0A%20%20-pspecifies%20the%20target%20package%0A%0A%0A%20%20-dfolder%20where%20generated%20class%20files%20are%20placed%0A%0A" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/&amp;t=WebService+Client+in+JAX-WS+%28Java+6+and+above%29" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/&amp;title=WebService+Client+in+JAX-WS+%28Java+6+and+above%29&amp;summary=Given%20a%20WSDL%20URL%2C%20you%20may%20generate%20the%20Java%20client%20classes%20using%20the%20JDK%20provided%20tool%20wsimport.%20The%20basic%20usage%3A%0A%0A%0A%24%20wsimport%20%26lt%3Bwsdl_url%26gt%3B%0A%0A%0AThe%20common%20command-line%20parameters%20supported%20by%20this%20tool%3A%0A%0A%0A%0A%20%20-pspecifies%20the%20target%20package%0A%0A%0A%20%20-dfolder%20where%20generated%20class%20files%20are%20placed%0A%0A&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/&amp;title=WebService+Client+in+JAX-WS+%28Java+6+and+above%29" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2008/12/30/webservice-client-in-jax-ws-java-6-and-above/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MetaWeblog API in Java</title>
		<link>http://indiwiz.com/2008/11/20/metaweblog-api-in-java/</link>
		<comments>http://indiwiz.com/2008/11/20/metaweblog-api-in-java/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 16:43:18 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[webservice]]></category>
		<category><![CDATA[xml-rpc]]></category>

		<guid isPermaLink="false">http://indiwiz.wordpress.com/?p=28</guid>
		<description><![CDATA[Recently we were assigned with the task of writing code to remotely insert an entry to a blog. And we had to select the Blogging software. So we started with the search for a blogging software which exposed its API. To our amazement, we found XML-RPC ruling the blogging API world. And one software independent [...]]]></description>
			<content:encoded><![CDATA[<p>Recently we were assigned with the task of writing code to remotely insert an entry to a blog. And we had to select the Blogging software. So we started with the search for a blogging software which exposed its API. To our amazement, we found XML-RPC ruling the blogging API world. And one software independent standard for it is the <a href="http://www.xmlrpc.com/metaWeblogApi">MetaWeblog API</a>.</p>
<p>After selecting the API, we had to find a software supporting this API. This assignment was for a demo we were to show. So we wanted a minimal blogging software with no configuration. We found <a href="http://pebble.sourceforge.net/">Pebble</a> (we used version 2.3.1). This software is cool. Installation is breeze, just put the WAR file in an application server, and you are ready to use it!</p>
<p>Now came the implementation part. I assumed the existence of a Java library implementing this MetaWeblog API. But did not find any. So the next obvious step: use some XML-RPC library in Java to implement the call. I had some bad opinion about <a href="http://ws.apache.org/xmlrpc/">Apache&#8217;s XML-RPC library</a>. I had used it long back ago, and I hated the way it was implemented. Since then I have been using Python to access XML-RPC services. But, this time, the job required use of Java.</p>
<p>So we ventured to the next step: finding an alternative OpenSource Java XML-RPC library. We found <a href="http://rox-xmlrpc.sourceforge.net/">RoX</a>. We were happy because RoX was born out of frustration of using Apache&#8217;s XML-RPC engine. We implemented it. And RoX did not work for Pebble (still not able to figure out if it was a mistake on our part, or RoX really did have a bug). So switched to Apache (version 3.1.1). The 3.x API seems to have been simplified. So finally we wrote:</p>
<pre class="brush: java;">
import org.apache.xmlrpc.XmlRpcException;
import org.apache.xmlrpc.client.XmlRpcClient;
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;

...

XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL(&quot;http://localhost:8080/pebble/xmlrpc/&quot;));
XmlRpcClient client = new XmlRpcClient();
client.setConfig(config);

// Params needed: blogid, username, password, struct, publish
// First create the fourth parameter, struct:
Map&lt;string, String&gt; m = new HashMap&lt;string, String&gt;();
m.put(&quot;title&quot;, &quot;Hello World &quot; + Calendar.getInstance().toString());
m.put(&quot;link&quot;, &quot;http://www.indiwiz.com/&quot;);
m.put(&quot;description&quot;, &quot;This is the content of the post!&quot;);

Object[] params = new Object[]{&quot;default&quot;, &quot;username&quot;, &quot;password&quot;, m, true};

String ret = (String) client.execute(&quot;metaWeblog.newPost&quot;, params);
System.out.println(ret);
</pre>
<p>And then we delivered our demo!</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2008/11/20/metaweblog-api-in-java/&amp;title=MetaWeblog+API+in+Java" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2008/11/20/metaweblog-api-in-java/&amp;title=MetaWeblog+API+in+Java" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2008/11/20/metaweblog-api-in-java/&amp;title=MetaWeblog+API+in+Java&amp;desc=Recently%20we%20were%20assigned%20with%20the%20task%20of%20writing%20code%20to%20remotely%20insert%20an%20entry%20to%20a%20blog.%20And%20we%20had%20to%20select%20the%20Blogging%20software.%20So%20we%20started%20with%20the%20search%20for%20a%20blogging%20software%20which%20exposed%20its%20API.%20To%20our%20amazement%2C%20we%20found%20XML-RPC%20ruling%20the%20blogging%20API%20world.%20And%20one%20software%20i" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2008/11/20/metaweblog-api-in-java/&amp;t=MetaWeblog+API+in+Java" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2008/11/20/metaweblog-api-in-java/&amp;title=MetaWeblog+API+in+Java&amp;summary=Recently%20we%20were%20assigned%20with%20the%20task%20of%20writing%20code%20to%20remotely%20insert%20an%20entry%20to%20a%20blog.%20And%20we%20had%20to%20select%20the%20Blogging%20software.%20So%20we%20started%20with%20the%20search%20for%20a%20blogging%20software%20which%20exposed%20its%20API.%20To%20our%20amazement%2C%20we%20found%20XML-RPC%20ruling%20the%20blogging%20API%20world.%20And%20one%20software%20i&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2008/11/20/metaweblog-api-in-java/&amp;title=MetaWeblog+API+in+Java" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2008/11/20/metaweblog-api-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick WebService Client in Groovy</title>
		<link>http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/</link>
		<comments>http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 09:50:57 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://indiwiz.wordpress.com/?p=17</guid>
		<description><![CDATA[Writing WebService client in Groovy is simple. import groovy.net.soap.SoapClient def proxy = new SoapClient(&#34;http://localhost:7777/path/to/endpoint?WSDL&#34;) def result = proxy.sayHello(&#34;Subhash&#34;) println result sayHello() is the operation name. More details here. See the Installation part, you need to put the Groovy SOAP Jar in ${user.home}/.groovy/lib. Share this on del.icio.us Digg this! Post this on Diigo Share this on [...]]]></description>
			<content:encoded><![CDATA[<p>Writing WebService client in Groovy is simple.</p>
<pre class="brush: python;">
import groovy.net.soap.SoapClient

def proxy = new SoapClient(&quot;http://localhost:7777/path/to/endpoint?WSDL&quot;)
def result = proxy.sayHello(&quot;Subhash&quot;)

println result
</pre>
<p><tt>sayHello()</tt> is the operation name.</p>
<p>More details <a href="http://docs.codehaus.org/display/GROOVY/Groovy+SOAP">here</a>. See the Installation part, you need to put the Groovy SOAP Jar in <tt>${user.home}/.groovy/lib</tt>.</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/&amp;title=Quick+WebService+Client+in+Groovy" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/&amp;title=Quick+WebService+Client+in+Groovy" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/&amp;title=Quick+WebService+Client+in+Groovy&amp;desc=Writing%20WebService%20client%20in%20Groovy%20is%20simple.%0A%0A%5Bsourcecode%20language%3D%27python%27%5D%0Aimport%20groovy.net.soap.SoapClient%0A%0Adef%20proxy%20%3D%20new%20SoapClient%28%22http%3A%2F%2Flocalhost%3A7777%2Fpath%2Fto%2Fendpoint%3FWSDL%22%29%0Adef%20result%20%3D%20proxy.sayHello%28%22Subhash%22%29%0A%0Aprintln%20result%0A%5B%2Fsourcecode%5D%0A%0AsayHello%28%29%20is%20the%20operation%20name.%0A%0AMore%20de" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/&amp;t=Quick+WebService+Client+in+Groovy" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/&amp;title=Quick+WebService+Client+in+Groovy&amp;summary=Writing%20WebService%20client%20in%20Groovy%20is%20simple.%0A%0A%5Bsourcecode%20language%3D%27python%27%5D%0Aimport%20groovy.net.soap.SoapClient%0A%0Adef%20proxy%20%3D%20new%20SoapClient%28%22http%3A%2F%2Flocalhost%3A7777%2Fpath%2Fto%2Fendpoint%3FWSDL%22%29%0Adef%20result%20%3D%20proxy.sayHello%28%22Subhash%22%29%0A%0Aprintln%20result%0A%5B%2Fsourcecode%5D%0A%0AsayHello%28%29%20is%20the%20operation%20name.%0A%0AMore%20de&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/&amp;title=Quick+WebService+Client+in+Groovy" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2008/11/18/quick-webservice-client-in-groovy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick WebService in Java 6</title>
		<link>http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/</link>
		<comments>http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 09:16:13 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jax-ws]]></category>
		<category><![CDATA[webservice]]></category>

		<guid isPermaLink="false">http://indiwiz.wordpress.com/?p=15</guid>
		<description><![CDATA[To write a quick JAX-WS webservice in Java 6: package test; import javax.xml.ws.Endpoint; @javax.jws.WebService public class MyWebService{ @javax.jws.WebMethod public String getQuote(String name){ return &#34;1234.56&#34;; } public static void main(String[] arg){ Endpoint end = Endpoint.create(new MyWebService()); end.publish(&#34;http://localhost:1000/MyWebService&#34;); } } To compile and run: $ apt -d bin/ MyWebService.java $ java -cp bin test.MyWebService Share this on [...]]]></description>
			<content:encoded><![CDATA[<p>To write a quick JAX-WS webservice in Java 6:</p>
<pre class="brush: java;">
package test;

import javax.xml.ws.Endpoint;

@javax.jws.WebService
public class MyWebService{

  @javax.jws.WebMethod
  public String getQuote(String name){
    return &quot;1234.56&quot;;
  }

  public static void main(String[] arg){
    Endpoint end = Endpoint.create(new MyWebService());
    end.publish(&quot;http://localhost:1000/MyWebService&quot;);
  }
}
</pre>
<p>To compile and run:</p>
<pre>
$ apt -d bin/ MyWebService.java
$ java -cp bin test.MyWebService
</pre>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/&amp;title=Quick+WebService+in+Java+6" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/&amp;title=Quick+WebService+in+Java+6" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/&amp;title=Quick+WebService+in+Java+6&amp;desc=To%20write%20a%20quick%20JAX-WS%20webservice%20in%20Java%206%3A%0A%0A%5Bsourcecode%20language%3D%27java%27%5D%0Apackage%20test%3B%0A%0Aimport%20javax.xml.ws.Endpoint%3B%0A%0A%40javax.jws.WebService%0Apublic%20class%20MyWebService%7B%0A%0A%20%20%40javax.jws.WebMethod%0A%20%20public%20String%20getQuote%28String%20name%29%7B%0A%20%20%20%20return%20%221234.56%22%3B%0A%20%20%7D%0A%0A%20%20public%20static%20void%20main%28String%5B%5D%20arg%29" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/&amp;t=Quick+WebService+in+Java+6" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/&amp;title=Quick+WebService+in+Java+6&amp;summary=To%20write%20a%20quick%20JAX-WS%20webservice%20in%20Java%206%3A%0A%0A%5Bsourcecode%20language%3D%27java%27%5D%0Apackage%20test%3B%0A%0Aimport%20javax.xml.ws.Endpoint%3B%0A%0A%40javax.jws.WebService%0Apublic%20class%20MyWebService%7B%0A%0A%20%20%40javax.jws.WebMethod%0A%20%20public%20String%20getQuote%28String%20name%29%7B%0A%20%20%20%20return%20%221234.56%22%3B%0A%20%20%7D%0A%0A%20%20public%20static%20void%20main%28String%5B%5D%20arg%29&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/&amp;title=Quick+WebService+in+Java+6" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2008/11/18/quick-webservice-in-java-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
