Monday, January 14, 2013

REST and SOAP Web Services


REST Web Service

  • REST => Representational State Transfer,  means  each unique URL is a representing some object. You can get the contents of that object using an HTTP GET, also you can use a POST, PUT, or DELETE to modify the object.
  • It is Light weight ,  not a lot of extra xml markup, Human Readable Results,  Easy to build
  • REST has no WSDL interface definition
  • REST is over HTTP, REST is stateless
  • REST can be  plain text, JSON, HTML etc which can transfer over HTTP
  • REST services are easily cacheable.
  • In REST, For transport security we can use https and for authentication, basic auth
  • REST is much simpler and easy to interop in many languages.
  • REST is a better choice for integration between websites, with public API, on the TOP of layer (VIEW, ie, javascripts taking calls to URIs).

SOAP Web Service:

  • SOAP is a protocol.
  • SOAP was designed to give access to Objects as in Object Oriented Programming Objects; i.e., data plus methods
  • SOAP can be over any transport protocols such HTTP, FTP, STMP, JMS
  • SOAP is using soap envelope
  • From any given WSDL, we can generate
  • The problem with SOAP is its complexity when the other WS-* specifications come in and there are countless interop issues if you stray into the wrong parts of WSDL, XSDs, SOAP, WS-Addressing etc.
  • SOAP is a XML-based protocol that tunnels inside an HTTP request/response, so even if you use SOAP, you are using REST too
  • SOAP is a better choice for integration between legacy/critical systems and a web/web-service system, on the foundation layer, where WS-* make sense (security, policy, etc.).



No comments:

Post a Comment