SOAP (Simple Object Access Protocol)

SOAP is a messaging protocol used to exchange information in computer networks using web services. SOAP is an alternative to the very popular REST framework which is also widely used within web services to exchange information. But unlike REST, the SOAP protocol rely on XML and is therefor in some situations found to be cumbersome by developers as a full XML structure has to be built every time. An advantage of SOAP is the fact that it's platform and language independent and can be used anywhere to extend HTTP with XML messaging .

There is two major aspects worth noticing about SOAP:

  1. An envelope, which denotes the start and end of a message. Its mandatory for the envelope to contain a body, in which the message or data is written. Beside the body it most likely also contain a header element, this however is not mandatory. The header contains any optional attributes for processing the content of the message/body.
  2. SOAP is platform and language independent and can operate over any protocols such as HTTP SMTP, TCP and UDP.

Below is an example of a SOAP Envelope:



Beside the message a SOAP body can contain a Fault element, which denote any errors that might have occured in the delivery of either the message or respons. Typically this is followed by a Status code 500 Internal Server Error.
The fault element is defined as follows, and is included within the body element.
  <soap:Fault>
  ...
  </soap:Fault>

Whereas a successful message will not contain the Fault element and is followed by a HTTP/1.0 200 OK. 

Kommentarer

Populære opslag fra denne blog

Uber Technology Stack

Neuralink - The merging of Brain and Machine

Python Password Hashing (Bcrypt)