SOAP Explained: The Formal Way Systems Exchange Data

SOAP explained in plain terms means a strict, formal standard for one computer system to ask another for data, using carefully structured XML messages with built-in rules for security and reliability. The central question is why anyone would choose such formality when lighter options exist, and the short answer is trust: in banking, healthcare, and government, a message must be provably correct, signed, and accounted for.

Think of the difference between a text message and a registered letter. A text is quick and informal, fine for most days. A registered letter is slower and heavier, but it carries proof of sending, a signature, and a record, which is exactly what you want when the contents truly matter. SOAP is the registered letter of the software world.

SOAP stands for Simple Object Access Protocol, a name that has outlived its accuracy, and it was standardised in the late 1990s, when the web’s first services needed a way to talk to each other. It remains in use wherever contracts, compliance, and guaranteed delivery outweigh convenience.

Key takeaways

  • SOAP is a strict messaging standard built on XML, with a formal envelope structure.
  • Every service describes itself in a WSDL file, a machine-readable contract.
  • It has built-in standards for security, transactions, and reliable delivery.
  • It is verbose and heavy compared with modern REST APIs.
  • It suits banks, healthcare, government, and other regulated systems.

What SOAP is

SOAP is a protocol for exchanging structured information between systems, defined by the World Wide Web Consortium. A SOAP message is an XML document wrapped in an envelope, with a header for extra information, such as authentication or routing, and a body carrying the actual request or response. Every message follows the same shape, so any system that speaks SOAP can read any other system’s messages.

The formality is the point. Where a REST API might accept whatever JSON a client sends and hope for the best, a SOAP service publishes a WSDL file, a Web Services Description Language document, that spells out every operation, every field, its type, and whether it is required. Tools read the WSDL and generate client code automatically, so a mismatch is caught before the code ever runs.

SOAP also carries a family of standards, known as WS-*, that add features REST leaves to each team to invent. WS-Security signs and encrypts parts of a message, WS-ReliableMessaging guarantees delivery even across failures, and WS-AtomicTransaction lets several operations succeed or fail together. For a bank moving money, those guarantees are not optional extras.

Messages usually travel over HTTP, the same transport as the web, though SOAP can use others. That makes it easy to pass through firewalls, but it also means every request carries the full weight of XML: opening tags, closing tags, and namespaces, which makes SOAP messages several times larger than the equivalent JSON. Our guide to REST APIs explains the lighter style that has largely replaced SOAP for new public APIs, and why simplicity won everywhere formality was not required.

How SOAP works

It begins with the contract. A team publishes a WSDL file describing its service: the operations it offers, the messages each one expects, and the address where it lives. A client team reads that file, often with a tool that generates the code to call it, and builds its side against the contract instead of against a person or a document.

When the client needs something, it builds a SOAP envelope: an XML document with a header, which may carry a security token or a transaction identifier, and a body holding the request, with each value tagged by name and type. The envelope is sent to the service, usually as an HTTP POST, and the service parses it, checks it against the contract, and runs the operation.

The service answers with another envelope. If the operation succeeded, the body carries the result, structured the same strict way. If it failed, the body carries a fault, a standardised error with a code, a reason, and detail, so the client can tell a malformed request from a business rule it broke, without guessing.

Because the contract is strict, versioning is deliberate. Adding a field is usually safe, but changing one can break every client, so SOAP services tend to version their operations explicitly and keep old versions running for years. That caution is part of why the systems that use SOAP change slowly, and why they change safely. Our guide to API design explains the principles behind designing these contracts well, whichever style of API a team chooses.

A photograph of a dark office at night with a laptop showing a glowing green structured document with nested sections
SOAP wraps every request in a formal envelope, with a contract that spells out each field, so nothing is left to guesswork.

Comparing SOAP with REST

Aspect REST API SOAP
Message format Usually JSON, light and readable XML, verbose and strict
Contract Documentation, often informal WSDL file, machine-readable
Security Usually TLS plus tokens Built-in WS-Security standards
Reliability Left to the application Built-in delivery guarantees
Best for Public APIs, web and mobile Regulated, enterprise systems

Where SOAP is used

Banking is its stronghold. Payment systems, clearing houses, and core banking platforms exchange SOAP messages to move money, check balances, and settle trades, because the standard’s guarantees about delivery and security are part of what regulators require. A payment that is sent twice, or lost, is a disaster, and SOAP’s design makes both less likely.

Healthcare uses it for the same reason. Hospital systems exchange patient records, lab results, and prescriptions through SOAP services, where the data is sensitive, the rules are strict, and the cost of a misunderstood message is measured in harm. The formality is a safety feature, not a burden.

Government and telecoms follow the pattern. Tax systems, identity services, and network provisioning all run on SOAP where they were built in the 2000s and have never had a reason to change. These systems work, they are certified, and replacing them would mean re-proving everything they guarantee.

Large enterprises still use SOAP internally, too, especially where older systems must keep talking to newer ones. An enterprise service bus often translates between SOAP services and modern APIs, letting the old and the new coexist without either side changing.

Strengths and limits

The greatest strength of SOAP is certainty. The contract, the types, the security, and the delivery guarantees are all standardised, so two organisations can build against each other with confidence, and a regulator can audit what happened. For systems where a mistake costs money or safety, that certainty is worth a great deal.

It is also language-neutral in a strong sense. Because the WSDL contract generates client code in many languages, a Java service can talk to a .NET client and a Python one, with each side’s tools handling the translation. That neutrality was a large part of its original appeal.

Its limits are weight and speed. XML messages are large, parsing them is slow, and the tooling is heavy, which is why mobile apps and public APIs abandoned SOAP for JSON years ago. A developer building a new public API today would almost never choose it.

The ecosystem is also ageing. Fewer developers learn SOAP, fewer tools support it well, and the knowledge of how to run it well is concentrated in the enterprises that still depend on it. It is not disappearing, but it is no longer where the industry’s energy goes.

SOAP checklist

  • Read the WSDL before writing any code; the contract is the truth.
  • Generate client code from the WSDL rather than hand-writing requests.
  • Use WS-Security for signing and encryption where the data demands it.
  • Handle SOAP faults explicitly: distinguish bad requests from business errors.
  • Keep messages as small as the contract allows; XML is already verbose.
  • Version operations explicitly and keep old versions running.
  • Test against the real service, not just the contract, before going live.
  • Log the full envelope for failures, but never log sensitive fields.
  • Plan the exit: know how a future migration to REST would work.

Frequently asked questions

What is SOAP?

SOAP is a messaging protocol for systems to exchange structured data, using XML envelopes with a header and a body. It is defined by a strict contract, the WSDL, and carries built-in standards for security and reliable delivery.

What is a WSDL file?

A WSDL file is a machine-readable description of a SOAP service: its operations, the messages each one takes and returns, the types of every field, and where the service lives. Tools generate client code from it automatically.

Is SOAP still used today?

Yes, widely in banking, healthcare, government, and large enterprises, where its guarantees about security, delivery, and contracts are required. New public APIs are usually built with REST instead.

How is SOAP different from REST?

REST is a loose style using JSON over HTTP, with contracts usually written in documentation. SOAP is a strict standard using XML, with a machine-readable WSDL contract and built-in security and reliability standards.

Why is SOAP so verbose?

Because XML wraps every value in opening and closing tags, and the envelope adds headers, namespaces, and type information. The verbosity is the price of the strictness that regulated systems depend on.

What is a SOAP fault?

A fault is the standardised error a SOAP service returns when something goes wrong. It carries a code, a reason, and detail, so the client can tell what failed and why, instead of guessing from a bare status code.

The bottom line

SOAP explained in one line is this: a registered letter between systems, formal, signed, and guaranteed, for messages where getting it wrong is not an option.

It is heavy, slow to write, and unfashionable, and for regulated systems it remains the right choice. Use it where the contract matters more than the convenience, and leave the light work to REST.

This article is general information about how SOAP works, not advice about which API style suits a particular system.

Latest articles

Scroll to Top