title: Why prefer REST over SOAP?
body: <p>If I need a web service to pass back and forth a complex object, is there a reason I should prefer SOAP over REST?  Here is an example of the possible SOAP message:</p>
  
  <pre><code>&lt;soap:Envelope&gt;
    &lt;soap:Header&gt;
      &lt;Credentials&gt;
        &lt;User&gt;Joe&lt;/User&gt;
        &lt;Password&gt;abc123&lt;/Password&gt;
      &lt;/Credentials&gt;
    &lt;/soap:Header&gt;
    &lt;soap:Body&gt;
      &lt;MyComplexBusinessObject&gt;
        &lt;Search&gt;
          &lt;First&gt;Joe&lt;/First&gt;
          &lt;Last&gt;Smith&lt;/Last&gt;
        &lt;/Search&gt;
        ...
        ...
      &lt;/MyComplexBusinessObject&gt;
    &lt;/soap:Body&gt;
  &lt;/soap:Envelope&gt;
  </code></pre>
  
  <p>Using REST, I would be asking the client to POST the following xml and authenticate using Basic Authentication:</p>
  
  <pre><code>&lt;MyComplexBusinessObject&gt;
    &lt;Search&gt;
      &lt;First&gt;Joe&lt;/First&gt;
      &lt;Last&gt;Smith&lt;/Last&gt;
    &lt;/Search&gt;
    ...
    ...
  &lt;/MyComplexBusinessObject&gt;
  </code></pre>
  
  <p>The SOAP message is slightly more complicated, but not by much.  They are still both XML, but SOAP comes with a WSDL and most programming environments will generate proxy classes for you.  However, most people I talk to say I should use REST instead because it's easier to use.  But I don't see how SOAP is any harder to use.  </p>
  
  <p>Am I missing something?</p>