Compare and contrast REST and SOAP web services? -


i figure out similar both using internet protocol (http) exchange data between consumer , provider.

the difference is:

  1. soap xml-based message protocol, while rest architectural style
  2. soap uses wsdl communication between consumer , provider, whereas rest uses xml or json send , receive data
  3. soap invokes services calling rpc method, rest calls services via url path
  4. soap doesn't return human readable result, whilst rest result readable plain xml or json
  5. soap not on http, uses other protocols such smtp, ftp, etc, rest on http

that's know differences between them. correct me , add more.

soap uses wsdl communication btw consumer , provider, whereas rest uses xml or json send , receive data

wsdl defines contract between client , service , static nature. in case of rest contract complicated , defined http, uri, media formats , application specific coordination protocol. it's highly dynamic unlike wsdl.

soap doesn't return human readable result, whilst rest result readable plain xml or json

this not true. plain xml or json not restful @ all. none of them define controls(i.e. links , link relations, method information, encoding information etc...) against rest far messages must self contained , coordinate interaction between agent/client , service.

with links + semantic link relations clients should able determine next interaction step , follow these links , continue communication service.

it not necessary messages human readable, it's possible use cryptic format , build valid rest applications. doesn't matter whether message human readable or not.

thus, plain xml(application/xml) or json(application/json) not sufficient formats building rest applications. it's reasonable use subset of these generic media types have strong semantic meaning , offer enough control information(links etc...) coordinate interactions between client , server.

rest on http

not true, http used , when talk rest web services assume http. http defines interface it's methods(get, post, put, delete, patch etc) , various headers can used uniformly interacting resources. uniformity can achieved other protocols well.

p.s. simple, yet interesting explanation of rest: http://www.looah.com/source/view/2284


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -