• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Convenient features of REST against SOAP

 
Ranch Hand
Posts: 77
Eclipse IDE Tomcat Server Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know there is big debate going over the net about REST against SOAP. I would like to ask few questions on the top of that.

I am using JAX-WS (SOAP) for quiet few years and It took me no time to learn and it becomes difficult to fit REST on top of SOAP because I could not find a single reason that will convince me that REST is better than SOAP.

People say that REST is easier than SOAP. But according to me, I don't see any learning curve difference between the two.
Suppose I add 1 field in say 10 domain object which is not null, how will I notify my webservice clients if I am using REST. In SOAP generally we publish WSDL. But there is no WSDL here.
How to publish URIs to the client. Let me explain this point in detail.
Say I want to expose cancel order service in REST. My URI is http://mydomain.com/orders/{orderId}. How will my client know that they have to use DELETE and not GET as I have only cancelOrder method and not getOrder method. Also how to publish these different URIs. In SOAP, we publish WSDL. I agree that client need to be recompiled. But publishing the changes to the client is easier in the SOAP. 4. Also people say REST is architecture style. What does this mean?

I am neither against REST nor favouring SOAP. But I am not getting convinced to the extent at which people favour REST. So I think I must be missing some good points of SOAP.

I hope this is not a duplicate question. I tried to search about these specific questions and didn't find answer.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In SOAP generally we publish WSDL. But there is no WSDL here.


True. Some JAX-RS implementations (like Jersey) support WADL, which serves the same purpose (although some people think it is not necessary). But generally there is no formalized documentation of the API, mostly I'd guess because REST WS take few parameters to begin with, and those are easily described. REST is mostly used where you don't have 10 domain objects.

You're correct that in general REST is less feature rich than SOAP - no WSDL, no WS-Security, no UDDI. If you need those then SOAP is for you. I'd count REST's simpleness as one of the chief benefits, though. All that is needed is an HTTP client, which is built into just about all languages/platforms where I might want to consume a WS, particularly mobile apps and web browsers. Same for JSON, which is often used as data format with REST. The overwhelming majority of WS used by mobile apps and web apps is based on REST, not SOAP (which quickly becomes a hassle in these environments).

REST is architecture style. What does this mean?


That question goes beyond what can usefully be explained in a forum post. Start with some of the articles linked in the WebServicesFaq.
 
Maybe he went home and went to bed. And took this tiny ad with him:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic