SOAP & WSDL

Published on:

Most important commands to remember

  • xmllint --noout FILE — check XML well-formedness.
  • xmllint --format FILE — print a readable XML view.

Commands and flags

Option Meaning
--nonet Disable network access by the XML parser.
--noout Suppress document output while reporting parse errors.
--format Format XML for terminal inspection; it does not rewrite the source file.

Use a trusted exported service contract. No entity substitution, schema fetching, or SOAP request is performed.

The concepts that matter

1. SOAP defines an XML message envelope

SOAP is a messaging framework using an XML Envelope. An optional Header carries message-level information; the Body carries the application message or a fault.

SOAP is not simply arbitrary XML sent over HTTP. Its envelope structure and processing rules matter. HTTP is a common binding, but the message framework and its transport binding are distinct concepts.

2. Namespaces identify meaning beyond element spelling

XML namespaces qualify names so elements from different vocabularies can coexist. Prefixes are local aliases; the namespace URI plus local name determines identity, not whether the prefix happens to be soap or s.

SOAP 1.1 and SOAP 1.2 use different envelope namespaces and HTTP conventions. Copying headers and body fragments from different versions can create a request that looks plausible but does not match the service’s expectations.

3. WSDL describes the service contract

Web Services Description Language (WSDL) describes operations, message structures, bindings, and endpoints. XML Schema definitions describe data types. A generated client uses this contract to build requests and interpret responses.

In WSDL 1.1, port types describe abstract operations while bindings connect them to concrete protocols. Other WSDL versions use different vocabulary. A contract can import additional definitions, so one file may not contain every required type.

4. A parsed document is not a successful invocation

XML well-formedness checks syntax. Schema validation checks conformance to a schema. SOAP processing checks envelope and message rules. The application then decides whether the operation is allowed and meaningful.

A SOAP Fault reports a processing failure and needs interpretation alongside HTTP status. Authentication or message-signature extensions add further requirements. A syntactically correct envelope therefore does not prove a valid signature, authorized call, or successful business action.

One small example

Optional: place a trusted WSDL export at service.wsdl in your current directory. The commands inspect it locally without calling the service.

xmllint --nonet --noout service.wsdl
xmllint --nonet --format service.wsdl

The first command normally prints nothing when XML is well formed and exits nonzero on a parse error. It does not validate the document against WSDL or XML Schema definitions.

In the formatted view, identify namespace declarations, operations, referenced types, bindings, and any endpoint addresses. Exact element names depend on WSDL version. Imported schemas remain separate; disabling network access means this example does not retrieve them.

A readable contract does not establish that its endpoint is live or that your account can invoke it. The original file is unchanged and no cleanup is needed. Do not share internal endpoints or sensitive contract annotations unintentionally.

Keep this idea: SOAP defines messages, WSDL describes the contract, and parsing XML is only the first layer of validation.