SOA, SOAP, and Rest technologies

Manura Lakshan
3 min readFeb 25, 2021

--

introduction to the technologies

SOA

SOA means Service-Oriented Architecture. It consists of a system architecture model in which the business functions of a company are defined as services that may be executed using standard methods mainly based on the exchange of messages, thereby allowing to combine services developed with new and old technologies, which enables components to integrate and coordinate in an effective and agile manner, the reduction of implementation costs, a greater innovation in regard to services for customers, to quickly adapt to change and to react sooner before the competition.

SOAP

SOAP is a protocol for the exchange of messages over computer networks, generally using HTTP. This protocol is based on XML, making it easier to read, even if messages are longer and therefore considerable slower to transfer. These could be some reasons to use SOAP, instead of what REST services offer.

We can find several types of message models in SOAP, but the most common is RPC, where the intersecting point of a message between the client and the server results immediately in a response of the message to the client.

REST

REST (Representational State Transfer) is a software architecture style aimed at distributed hypermedia systems such as the web. This term refers specifically to a collection of principles for the design of network architectures.

There are several projects that can benefit from a REST architecture. In particular, those for which the main idea is in the way server requests are made by the client, based on the relevant resource.

It is important for a REST architecture to comply with 6 principles.

  • Client — Server
  • Uniform Interface
  • Cacheable
  • Stateless
  • Layered
  • Code-on-demand

how they work

SOA

In order to implement complete business solutions using SOA, it is necessary to encapsulate business functions as services. Software architects in collaboration with developers can set forth a number of ways to perform these implementations, among which are the possibility of reusing functions already implemented in other systems, using connectors to obtain or update information in existing systems and re-implement the required function.

SOAP

The SOAP specification describes a standard, XML-based way to encode requests and responses, including:

  • Requests to invoke a method on a service, including in parameters
  • Responses from a service method, including return value and out parameters
  • Errors from a service

SOAP describes the structure and data types of message payloads by using the emerging W3C XML Schema standard issued by the World Wide Web Consortium (W3C). SOAP is a transport-agnostic messaging system; SOAP requests and responses travel using HTTP, HTTPS, or some other transport mechanism.

REST

One of the most highly debatable topics is when REST should be used or when to use SOAP while designing web services. Below are some of the key factors that determine when each technology should be used for web services REST services should be used in the following instances

  • Limited resources and bandwidth
  • Statelessness
  • Caching
  • Ease of coding

cons and pros

--

--