Enterprise Integration Zone is brought to you in partnership with:

Mark O'Neill is VP Innovation at Axway. Previously, he was CTO and co-founder at Vordel, acquired by Axway in 2012. He is the author of the McGraw-Hill book "Web Services Security" and is frequent speaker at conferences including Java One, the RSA Security Conference, and Oracle Open World. Mark is based on Boston, Massachusetts. Mark is a DZone MVB and is not an employee of DZone and has posted 64 posts at DZone. You can read more from them at their website. View Full User Profile

Another Key Difference Between REST and SOAP

11.30.2012
| 17210 views |
  • submit to reddit

A lot has been written about the difference between REST APIs and SOAP Web Services. The technical differences are well known at this stage. SOAP is heavyweight, while REST is light and mobile-friendly. However, there is another key difference which is often overlooked:

  • It is easy to create SOAP Web Services, but difficult to consume them. 
  • It is difficult to create a good REST APIs, but easy to consume them. 
Taking SOAP first: development platforms such as .NET made it almost too easy to create a SOAP Web Service. I remember seeing MSDN demos showing how, in a few clicks, you can take a .NET object and expose it as a Web Service, complete with WSDL. But, in those quick clicks, what had you created? You had exposed the methods of your objects as SOAP operations. But why? Is this really what you wanted to do? And while it was easy to say "Clients can just consume the WSDL to call my new Web Service", this was easier said than done. And when clients did this, it often made little sense to directly run the methods of the class.  Fast forward to the world of REST. One of the great virtues of REST is that it is so much easier to consume a REST API, compared to consuming a SOAP Web Service. In addition, it does not require parsing XML, if you prefer to directly read in JSON. However, creating a good REST API takes thought and some decisions. You should think about how you'll appropriately use the HTTP verbs, how to express versioning, and what kind of error messages you'll return. Fortunately, an API Server helps a lot here, by providing a platform for delivering APIs, to take care of aspects like security, usage quota-management, and analytics. But it still is important to take time to design your API up front.
Published at DZone with permission of Mark O'neill, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Kisito Momo replied on Wed, 2012/12/05 - 12:18pm

Hi

I think consuming SOAP it's also easy, when WDSL is available many standard client tools generate client stup automatically.

Peterfreeman Osama replied on Sun, 2014/01/12 - 10:00am

 Thanks for sharing the post. parents are worlds best person in each lives of individual.

customer service skills listhr source consultinghuman resources internships superior staffingproject proposal template

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.