What Is SOAP?

SOAP (Simple Object Access Protocol) is a messaging protocol for exchanging structured information between systems. Standardized by the W3C in the early 2000s, SOAP dominated enterprise integration for over a decade and remains deeply embedded in banking, healthcare, government, and insurance systems. If you have ever interacted with a payment gateway, ERP system, or government filing service, there is a good chance SOAP was involved.

Every SOAP message is an XML envelope with a specific structure: an outer <Envelope> element containing an optional <Header> (for metadata like authentication tokens, transaction IDs, and routing information) and a mandatory <Body> (containing the actual request or response data). This rigid structure ensures that every participant in a message exchange knows exactly what to expect.

SOAP APIs are described by WSDL (Web Services Description Language) files — XML documents that specify every operation, input message, output message, data type, and binding. A WSDL is a complete, machine-readable contract. Tools can generate client code in Java, C#, Python, or any language directly from a WSDL, with full type safety and compile-time checking.

Where SOAP truly distinguishes itself is in its WS-* extensions: WS-Security for message-level encryption and digital signatures, WS-ReliableMessaging for guaranteed delivery, WS-AtomicTransaction for distributed transactions, and WS-Addressing for complex routing. These features make SOAP the protocol of choice when compliance, auditability, and reliability are non-negotiable.

How SOAP Works with Opsalis

Many organizations have invested years building SOAP services they cannot (and should not) rewrite. Opsalis lets them monetize those services without touching a single line of SOAP code.

  1. Owner provides a WSDL file. Upload your WSDL via the handler dashboard. The handler parses all operations, message types, and bindings to understand your API surface.
  2. Handler converts JSON parameters to SOAP XML envelopes. When a consumer request arrives (as simple JSON), the handler constructs the proper SOAP envelope, adds the required namespace declarations, and sends it to your SOAP endpoint via HTTP POST.
  3. Response XML is parsed back to JSON. The handler strips the SOAP envelope, extracts the response body, and converts the XML data into clean JSON that the consumer receives. The consumer never sees XML.

Your SOAP server stays untouched. Keep your WSDL, your WS-Security configuration, your existing endpoints. The handler does all the protocol translation — consumers interact with a clean REST-style OpenAPI interface.

Demo API: Periodic Table

This demo uses the Periodic Table SOAP service — all 118 chemical elements with over 30 properties each: atomic number, symbol, name, atomic mass, electron configuration, electronegativity, melting and boiling points, density, discovery year, and more. A structured, hierarchical dataset that plays to SOAP's strengths in typed, schema-validated data exchange.

Code Example

Get element details via SOAP (Hydrogen)

# SOAP request wrapped in an XML envelope curl http://localhost:4003/soap \ -H "Content-Type: text/xml; charset=utf-8" \ -H "SOAPAction: GetElement" \ -d '<?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pt="http://opsalis.com/demo/periodic-table"> <soap:Body> <pt:GetElement> <pt:symbol>H</pt:symbol> </pt:GetElement> </soap:Body> </soap:Envelope>'

Response (XML)

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <GetElementResponse xmlns="http://opsalis.com/demo/periodic-table"> <element> <atomicNumber>1</atomicNumber> <symbol>H</symbol> <name>Hydrogen</name> <atomicMass>1.008</atomicMass> <category>Nonmetal</category> <discoveryYear>1766</discoveryYear> </element> </GetElementResponse> </soap:Body> </soap:Envelope>

The consumer never writes XML. Through the Opsalis handler, the same call looks like:

Same call via the Opsalis handler (JSON)

# Consumer sends simple JSON — handler builds the SOAP envelope curl http://localhost:3000/api/periodic-table/GetElement \ -H "Content-Type: application/json" \ -d '{ "symbol": "H" }'

SOAP at a Glance

Concept Details
Transport HTTP, SMTP, JMS, or any transport
Data format XML (exclusively)
Spec format WSDL (Web Services Description Language)
Message structure Envelope > Header (optional) > Body
Strongly typed Yes — XML Schema (XSD) enforces types
Best for Enterprise integration, financial systems, compliance-heavy industries