title: Using SOAP and REST
body: <p>I have used SOAP service successfully.</p>
  
  <p>Suppose there is a Web Service that exposes a method that returns the list of Students.</p>
  
  <pre><code>public Student[] listAllStudents(){
    //some code that return Student array
  }
  </code></pre>
  
  <p>Using SOAP will need these steps:</p>
  
  <ol>
  <li>Get the URL for the location of WSDL.<br>
  eg. <code>http://127.0.0.1/web/service/location/soap.php?wsdl</code></li>
  <li>Use some available technologies like  <a href="http://mojo.codehaus.org/axistools-maven-plugin/" rel="nofollow"><strong><em>axistools-maven-plugin</em></strong></a>  to generate all stub classes. There will be a generated class with the name like <em>Student</em></li>
  <li><p>Use the appropriate stub class/interface to invoke the service.</p>
  
  <p><code>Student[] students =  theStub.list_All_Students();</code></p></li>
  </ol>
  
  <p>Using REST service will be something like this.</p>
  
  <ol>
  <li>Get the right url for getting list of Students.<br>
  eg. <code>http://127.0.0.1/web/service/student/list?sort=true</code></li>
  <li>Use some URL Connection techniques like java.net.HttpURLConnection to get the result which is usually in JSON format.</li>
  <li>Parse the result.</li>
  </ol>
  
  <p>As a Java programmer, I have no problem in using <strong>SOAP</strong> because there are frameworks designed for it. Moreover, there is only <strong>one URL</strong> that I need to know for hitting the Web Service.</p>
  
  <p>Using <strong>REST</strong> is a bit confusing. I need to know all the <strong>specific URLs</strong> along with the query string required to be passed. From this point of view using REST is quite cumbersome.</p>
  
  <p><strong>My Questions:</strong></p>
  
  <ol>
  <li>From the programmer's perspective, is using REST useful at all?</li>
  <li>Is there any good framework that will make hitting REST easier?</li>
  </ol>