Home/SOAP Track/WSDL & XSD Mental Model

WSDL & XSD Mental Model

Build a mental model of WSDL and XSD so you can read carrier service definitions and diagnose contract issues.

What WSDL Tells You

WSDL (Web Services Description Language) is the contract. It defines: services (endpoints), ports (bindings), operations (methods), messages (input/output shapes), and types (XSD schemas). Think of it as the OpenAPI spec for SOAP — except it's XML and 10x more verbose.

Reading XSD Types

XSD defines the data types used in SOAP messages. Complex types are like interfaces — they define the shape of request/response objects. Simple types constrain values (enums, patterns, ranges). When a carrier says 'invalid request,' check your data against the XSD constraints first.
Carrier Reality

FedEx's WSDL defines a ShipmentType enum that must be one of: FEDEX_GROUND, FEDEX_EXPRESS, etc. Send 'FedEx Ground' instead and you'll get a validation fault with no useful message.

WSDL-First vs Code-First

Carrier SOAP APIs are WSDL-first: the WSDL is the source of truth. Generate your client code from the WSDL. Don't hand-code SOAP types — they'll drift from the contract. When the carrier updates their WSDL, regenerate and diff to find breaking changes.

Practice Drills

What does a WSDL file define?

A carrier updates their WSDL. What should you do?