Backend Service to be SOAP or REST

Not applicable

What is the better way of designing backend services? Is to better to design them as SOAP web service or REST APIs, since we anyway expose them as REST API in Apigee?

0 2 832
2 REPLIES 2

REST is indeed an architectural style. SOAP is a data protocol. This distinction is important;

The primary purpose of REST is to represent resources , and to provide mechanisms for discovering them. In contrast, SOAP is used for communicating structured data between computers, and that's all it really does.

The general consensus among experts these days is that REST over HTTP(s) is typically preferred unless there’s a compelling reason to use SOAP.

Also, at the end of the day, the best protocol is the one that makes the most sense for the organization, the types of clients that you need to support, and what you need in terms of flexibility. Most new APIs are built using REST and JSON simply because it typically consumes less bandwidth and is easier to understand both for developers implementing initial APIs as well as other developers who may write other services against it.

However, SOAP remains a valuable protocol in some circumstances, like if you need more robust security, SOAP’s support for WS-Security can come in handy(again, now a days REST over HTTP and OAuth implementation can also compensate this feature) .It also provides support for identity verification through intermediaries rather than just point-to-point, as provided by SSL. Another advantage of SOAP is that it offers built-in retry logic to compensate for failed communications.

Not applicable

This is simply rest vs soap advantages and disadvantages that I can get on google. What I am looking at is if we have an api gateway that can does routing from rest to rest, rest to soap, what would be the business advantages of exposing a backend service in restful style on the service bus instead of traditional soap service? again we can have api gateway on top of existing soa service bus. So is it okay to follow traditional service design or is it better to have everything in rest from end to end all the way from api gateway to service bus to backend ?