title: Coldfusion-to-Coldfusion web service call: SOAP vs cfhttp method call vs cfhttp post?
body: <p>How do you then handle the exception on the ws consumer-side thrown by the ws producer-side?</p>
  
  <p>I'm now using SOAP because I can use <code>&lt;cfinvoke&gt;</code> easily and not worry about JSON messing up my data types.  However its disadvantages are:</p>
  
  <ul>
  <li>WSDL must have a return type (i.e. can't return custom exception struct easily)</li>
  <li>WSDL needs reloading during development</li>
  <li>exception is not transmitted over nicely nor very helpful, and</li>
  <li>performance is quite slow</li>
  </ul>
  
  <p>Other then SOAP, what would you use to do CF-to-CF method call?  I can think of these alternatives:</p>
  
  <ul>
  <li><code>&lt;cfhttp&gt;</code> to <code>?method=remoteMethod</code></li>
  </ul>
  
  <p>Cons: need to use a custom json serializer because CF's would mess up datafield like phone number (serializes to a float) or dates (serializes to human-readable date)</p>
  
  <ul>
  <li><code>&lt;cfhttp&gt;</code> to <code>.cfm</code></li>
  </ul>
  
  <p>Cons: need to make sure onRequest and other layouts are not rendered (cannot use <code>onCFCRequest()</code>)</p>
  
  <p>Any comment or suggestion?</p>