• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

when should REST be used instead of SOAP and when it should not be used instead of SOAP?

 
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I read the differences between REST and SOAP everywhere. But practically when should REST be used instead of SOAP and when it should not be used instead of SOAP?

thanks
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My usual answer is that you should only use SOAP when you need the "WS-*" security related functions such as encryption, authentication, etc etc.

Keep in mind the SOAP is a formally specified messaging API independent of transport method while REST is an architectural style requiring strict use of HTTP.

Bill
 
Ranch Hand
Posts: 199
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Complementing the answer from William with SOAP based web services usually you have a public contract/interface, the wsdl file.
This file describes the functionalities provided by the service, with REST services you have to relay on the convention and in the documentation of the service (where available).

Best regards,
 
Monica Shiralkar
Ranch Hand
Posts: 2925
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks all. Does that mean one can conclude the below:

- There is nothing which REST can do but SOAP can not whereas viceversa is true..

- Only advantage of REST over SOAP is easy of development.From technology perspective there is no advantage.Only that less coding effort is required.


Please confirm whether my understanding is corret.


Thanks..
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, neither of those would be correct. William pointed out two areas where SOAP has capabilities that REST does not: Security and support for non-HTTP transport.
 
William Brogden
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Only advantage of REST over SOAP is easy of development.From technology perspective there is no advantage.Only that less coding effort is required



Wrong! RESTful style will always be faster to deliver responses to the client, simply because it skips all the SOAP message XML creation and parsing.

Much faster to analyze a request and much faster to send a response! Using much less server memory and CPU time.

Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic