The Secret Security Wiki

Categories
Categories

Simple Object Access Protocol

Simple Object Access Protocol (SOAP) is a client-server messaging protocol for exchanging structured data between web-services. SOAP uses XML for its message format and relies on standard application layer protocols, most often Hypertext Transfer Protocol (HTTP) or Simple Mail Transfer Protocol (SMTP), for message negotiation and transmission.

SOAP’s relative complexity has led developers to prefer the simpler interaction model offered by REST.

  • What are the differences between SOAP and REST?

    Both REST and SOAP offer a means of communications between web-service. REST is merely a convention implemented using the HTTP protocol and is therefore considered simpler to learn and implement.

    SOAP provides the following advantages when compared to REST:

    • Language, platform, and transport independent (REST requires the use of HTTP)
    • compatible with distributed enterprise environments ( direct point-to-point communication)
    • All calls sent through POST
    • Provides significant pre-build extensibility in the form of the WS* standards
    • Built-in error handling
    • Automation when used with certain language products

    REST is easier to use and is more flexible. It has the following advantages compared to SOAP:

    • Uses easy to understand standards like swagger and OpenAPI – Specification 3.0
    • Easy to learn
    • Efficient (SOAP uses XML for all messages, REST mostly uses smaller message formats like JSON) but also support XML format.
    • Fast (no extensive processing required)
    • Closer to other Web technologies in design philosophy
    • Can be stateless or stateful