WebServicesPro News Archives About Us Feedback

Recent Articles

Google Services Give You More Storage, If You Pay...
Google has finally unveiled a system under which you can pay them for more storage in Gmail, Picasa Web Albums, and eventually, a bunch of other Google services. For now, if your 2.82 gigabytes of Gmail space and 1...

SaaS Vs. OSS? Users Choose SaaS
Tim O'Reilly has an interesting post on why the GPLv3 took a pragmatic approach when it came to the "SaaS loophole" (i.e. SaaS apps aren't redistributed; no redistribution means SaaS vendors can use...

FreshBooks Opens API, Lets In Some Fresh Air
The Enterprise Web 2.0 revolution has been a godsend to small and midsized companies. Inexpensive, web-based tools and services mean the little guys now have access to professional office tools that rival those...

Speed Up Web Services With The SoapDocument...
I've done a lot of web services during the last couple of years and I simply love Service Oriented Architecture using SOAP. The power of using services as a means...

Optimize HTTP Requests & Web Service Calls
ASP.NET has an outgoing connection limit which is set to 2 connections by default. It means that the ASP.NET process does not create more than 2 concurrent...

What REST Vs. WS Says About OSS Vs. Traditional...
During the Redmonk unconference at CommunityOne, there was a discussion about whether REST was going to kill Web services (WS• ). This discussion followed a discussion on OSS and how ‘different' OSS really....

Consuming A WebService With Flash Media Server 2
Here's a very simple example on how to invoke and consume a WSDL webservice using serverside Actionscript. You will need Flash Media Server 2 for this, it will not work in Flash Communication Server. The...


09.13.07


From SOAP To REST Web Services

By Pete Freitag

I received a question in my email from reader, Rob Rawlins:

A client of mine wants me to change the SOAP web service I publish into a REST service, and I dont even know where to begin.

After googling around for a while you're one of the only people I could find mentioning ColdFusion and REST in the same sentence :-D

Any ideas on where I should be beginning with this?

It's a good question, and I'm not surprised that there isn't a whole lot on the internet about ColdFusion and REST, since it is so easy to create SOAP web services in CFML. So I thought this would make a good article...

To start it is essential to understand what the differences between the REST architecture and the SOAP architecture are. I've written a blog entry called REST vs SOAP Web Services which should give you a primer. For more details I would check out Roger Costello's Building Web Services the REST Way.

My next step would be to take a look at some actual REST web services that are popular, and well designed. If you are a visual learner like me this is an easy way to understand how they work.

Flickr API - Flickr has API's using REST, SOAP, and XML-RPC so it's a good one to see the differences.

Yahoo API's - Many of the Yahoo API's use REST.

37Signals API's - Basecamp, Backpack, Highrise all use the REST approach.


Once you have translated all the SOAP method requests into an REST request requests implementing the service should not be that difficult. Just invoke your SOAP component methods locally, and format the response in XML.

Before I had a chance to post this entry Rob has already implemented his REST service, and said:

Coincidentally I've already worked on my own solution which seems to be working nicely. I simply created a 'wrapper' for my current SOAP webservice, that uses to invoke the webservice with the POST data sent by the REST call, and then reformat the XML data ready to be parsed, I hadn't realized how simple it was, its actualy of benefit too me as it allows a more OO development approach to the service, and also makes for a much lower overhead and bandwidth.

The new service is super snappy, I'm very pleased.

•Originally published at Pete Freitag's Homepage.

Comments


About the Author:
Pete Freitag (http://www.petefreitag.com/) is a software engineer, and web developer located in central new york. Pete specializes in the HTTP protocol, web services, xml, java, and coldfusion. In 2003 Pete published the ColdFusion MX Developers Cookbook with SAMs Publishing.

Pete owns a Firm called Foundeo (http://foundeo.com/) that specializes in Web Consulting, and Products for Web Developers.

About WebServicesPro
WebServicesPro delivers news and strategy articles covering the broad scope of what is known as Web Services. Each issue of WebServicesPro is focused on Making Web Services a Reality.

WebServicesPro is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
PerlProNews.com SQLProNews.com
SysAdminNews DevWebPro.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITCertificationNews.com


-- WebServicesPro is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 4050
2007 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal

archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


WebServicesPro Home Page About Article Archive News Downloads WebProWorld Forums iEntry Advertise Contact WebProWorld Forum Making Web Services a Reality