0

Web services without the SOAP

Coldfusion

Inspired by the Basecamp API I took a stab at writing a similar interface to Furnishweb over the last couple of days. I liked the simplicity of their implementation and the fact so many people have written widgets and fun things to access Basecamp with it.

Now I know what you are saying "Well it's Basecamp that's why they use it!", but I think that is only a partial reason. It's just less complicated than SOAP web services. It also seemed like a fun challenge in doing something in Coldfusion that RUBY does.

Also after reading Ben's Blog on using CFHTTP to parse files in CFQUERY objects I thought my web services should return CVS files instead of XML (I will be adding XML later).

If you notice on the Basecamp API site they post the XML directly to the web service for complicated requests. I was sure Coldfusion could do this, but it took me awhile to find the answer.

To post xml to a url you do something like this:

Then in your web service code all you have to do is:

Seems to work great. The other parts of the request are simple to handle but the GetHttpRequestData() part had me stumped.

tags:
ColdFusion

Search

Jeff   Roberson