API Academy
🌐 English
  • 🌐 English
  • 🌐 繁體中文
HomePetstore APIExplore more APIs
HomePetstore APIExplore more APIs
🌐 English
  • 🌐 English
  • 🌐 繁體中文
🌐 English
  • 🌐 English
  • 🌐 繁體中文
  1. Advanced API Technologies
  • Introduction
  • Table of Contents
  • API Academy
    • Get Started
      • What is an API?
      • How Does an API Work?
      • How to Call an API?
      • How to Read an API Documentation?
      • Chapter Summary
      • Get realtime weather
    • API Fundamentals
      • API Funtamentals: Overview
      • Method & Path
      • Parameters
      • Request Body
      • Responses
      • API Specification & OAS
      • Chapter Summary
    • Working with APIs
      • Working with APIs: Overview
      • Making Requests from Spec
      • Environments and Variables
      • Chaining Multiple Endpoints
      • Handling Authentication
      • Handling API Signatures
      • Introduction to Scripts
      • Chapter Summary
    • Mocking APIs
      • Mocking APIs: Overview
      • Smart Mock
      • Mock Expectations
      • Cloud Mock
      • Mock Scripts
      • Chapter Summary
    • Designing APIs
      • Designing APIs: Overview
      • Introduction to API Design
      • Creating Your First API Project
      • Analyzing Requirements and Planning Your API
      • Designing Data Models
      • Designing Endpoints
      • Using Components and Reusability
      • Setting Up Authentication
      • API Design Guidelines
      • Chapter Summary
    • Developing APIs
      • Developing APIs: Overview
      • Setup: Install Your AI Coding Assistant
      • Quick Start: From Spec to Running API in 30 Minutes
      • Understanding the Generated Code
      • Testing Your API with Apidog
      • Deployment: Put Your API Online
      • Chapter Summary
    • Testing APIs
      • Testing APIs: Overview
      • Getting Started: Your First Test Scenario
      • Integration Testing and Data Passing
      • Dynamic Values
      • Assertions and Validations
      • Flow Control: If, For, ForEach
      • Data-Driven Testing
      • Performance Testing
      • Test Reports and Analysis
      • CI/CD Integration
      • Scheduled Tasks and Automation
      • Advanced Testing Strategies
      • Chapter Summary
    • API Documentations
      • API Documentations: Overview
      • Publishing Your First API Doc
      • Customizing Documentation Appearance
      • Interactive Features for Consumers
      • Advanced Publishing Settings
      • Managing API Versions
      • Chapter Summary
    • Advanced API Technologies
      • API Technologies: Overview
      • GraphQL
      • gRPC
      • WebSocket
      • Socket.IO
      • Server-Sent Events (SSE)
      • SOAP
      • Chapter Summary
    • API Lifecycle
      • API Lifecycle: Overview
      • Stages of the API Lifecycle
      • API Governance
      • API Security Best Practices
      • Monitoring and Analytics
      • API Versioning Strategies
      • The Future of APIs
      • Chapter Summary
    • API Security
      • API Security: Overview
      • API Security Fundamentals
      • Authentication vs Authorization
      • Understanding OAuth 2.0 and OpenID Connect
      • JSON Web Tokens (JWT)
      • OWASP API Security Top 10
      • Encryption and HTTPS
      • Chapter Summary
    • API Tools
      • API Tools: Overview
      • The Evolution of API Tools
      • API Clients
      • Command Line Tools (cURL, HTTPie)
      • API Design and Documentation Tools
      • API Mocking Tools
      • API Testing Tools
      • All-in-One API Platforms
      • Chapter Summary
    • API Gateway
      • API Gateway: Overview
      • What is an API Gateway?
      • Key Features of API Gateways
      • API Gateway vs Load Balancer vs Service Mesh
      • Popular API Gateway Solutions
      • The BFF (Backend for Frontend) Pattern
      • Chapter Summary
  • Modern Pet Store
    • Pet
      • Get Pet
      • Update Pet
      • Delete Pet
      • Create Pet
      • List Pets
      • Upload Pet Image
    • User
      • Update User
      • Get User
      • Delete User
      • Login
      • Logout
      • Create User
    • Store
      • List Inventory
      • Create Order
      • Get Order
      • Delete Order
      • Callback Example
      • Pay for an Order
    • Payments
      • Pay Order
    • Chat
      • Create Chat Completion
    • Webhooks
      • Pet Adopted Event
      • New Pet Available Event
  • Schemas
    • Pet
    • Category
    • User
    • ApiResponse
    • OrderPayment
    • Tag
    • Order
    • Links-Order
    • PetCollection
    • Bank Card
    • Bank Account
    • Links
    • Error
HomePetstore APIExplore more APIs
HomePetstore APIExplore more APIs
🌐 English
  • 🌐 English
  • 🌐 繁體中文
🌐 English
  • 🌐 English
  • 🌐 繁體中文
  1. Advanced API Technologies

SOAP

What is SOAP?#

SOAP (Simple Object Access Protocol) is an XML-based messaging protocol for exchanging information among computers. It was the dominant standard for enterprise web services before REST took over.
SOAP is rigorous, standardized, and highly extensible. It relies heavily on XML schemas and formal contracts, making it popular in industries that require strict reliability and security, such as banking and telecommunications.

Core Concepts#

1.
WSDL (Web Services Description Language): An XML file that acts as the "manual" for the API. It defines exactly what endpoints exist, what parameters they accept, and what they return.
2.
XML Envelope: Every SOAP message is wrapped in a specific XML structure.
3.
ACID Compliance: SOAP is designed to support atomic transactions (all-or-nothing), essential for financial transfers.

Code Example: The Envelope#

A SOAP message has a specific anatomy:
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
  <!-- Optional Header for Auth / Metadata -->
  <soap:Header>
    <Authentication>
       <User>admin</User>
       <Token>12345</Token>
    </Authentication>
  </soap:Header>
  
  <!-- The Actual Payload -->
  <soap:Body>
    <m:GetAccountBalance xmlns:m="http://bank.org/accounts">
      <m:AccountNumber>987654321</m:AccountNumber>
    </m:GetAccountBalance>
  </soap:Body>
</soap:Envelope>

Comparisons: SOAP vs. REST#

FeatureRESTSOAP
FormatJSON (usually), XML, TextXML only
PhilosophyResource-based (URI)Action-based (Remote Procedure)
ContractLoose (OpenAPI optional)Strict (WSDL required)
TransportHTTP/HTTPSHTTP, SMTP, TCP, JMS
ErrorsHTTP Status Codes (404, 500)SOAP Faults (in XML body)

Debugging SOAP in Apidog#

Although SOAP is legacy, Apidog fully supports it via its HTTP client.

1. Configure the Request#

Since SOAP is just HTTP POST with XML:
1.
Set Method to POST.
2.
Set Header Content-Type to text/xml or application/soap+xml.
3.
In Body, select XML.

2. Enter the Envelope#

Paste your XML Envelope into the body editor. Apidog provides Syntax Highlighting and XML Formatting to help manage large XML structures.
<soap:Envelope ...>
   ...
</soap:Envelope>

3. Parse the WSDL (Optional)#

While Apidog doesn't currently auto-generate collections from WSDL (like it does for OpenAPI), you can often find the endpoint URL inside the <soap:address> tag in the WSDL file.
See details SOAP/WebService

Key Takeaways#

Enterprise Standard: SOAP is strictly standardized and reliable, widely used in banking and legacy enterprise systems.
XML-Based: It uses XML for message format and WSDL for service definition.
ACID Compliance: Designed for atomic transactions where partial failure is not an option.
Apidog Compatibility: While legacy, you can fully test SOAP services in Apidog using the standard HTTP Client with XML bodies.
Continue with β†’ Chapter Summary
Modified atΒ 2025-12-25 10:13:12
Previous
Server-Sent Events (SSE)
Next
Chapter Summary
Built with