LAB-API-101 — SOAP Message & Schema Analysis
Purpose
SOAP 1.2 defines an XML-based messaging framework. The contract and schemas around a SOAP service can reveal message structure, namespaces, required headers, body elements and fault behaviour before any authorised request is sent.
Learning outcomes
You will:
- identify the SOAP
Envelope, optionalHeader, mandatoryBodyandFaultstructure; - distinguish the SOAP namespace from application namespaces;
- map XML elements to XSD constraints;
- identify security-relevant headers and error-handling behaviours;
- draft safe positive and negative test cases without attacking a live service.
Scenario
Northstar Training Services exposes an order-processing service to approved reseller systems. You have been given four synthetic artefacts:
Task 1 — Build the message map
Open order-request.xml and record:
- the SOAP version implied by the envelope namespace;
- every namespace prefix and its URI;
- the header blocks, their intended purpose and whether they appear mandatory;
- the immediate child of the SOAP body;
- the business identifiers that should be correlated across request, response and logs.
Checkpoint: Your map must distinguish protocol metadata from business data. Do not treat the auth:AccessContext header as part of the order payload.
Task 2 — Reconcile the request with the XSD
Use order.xsd to determine:
- which elements are mandatory;
- the allowed
deliveryModevalues; - the minimum and maximum quantity;
- the pattern applied to the reseller reference;
- whether additional elements are accepted by the schema.
Create a constraint table:
| Field | XSD type / rule | Valid example | Invalid boundary example |
|---|---|---|---|
resellerReference | |||
courseCode | |||
quantity | |||
deliveryMode |
Task 3 — Analyse fault handling
Inspect order-fault.xml and answer:
- Which SOAP fault code is used?
- Is the reason safe for a client to see?
- Does the detail block disclose internal implementation data?
- Which fields should be logged internally but removed from the public response?
- What correlation identifier would let support staff investigate without exposing a stack trace?
Task 4 — Create an authorised test charter
Write at least eight tests across these categories:
- schema conformance: missing, malformed and boundary values;
- header processing: absent or invalid access context, unknown header with
mustUnderstandsemantics; - authorisation: reseller attempts to reference another reseller's order;
- fault handling: client-safe errors, stable correlation IDs and no implementation leakage;
- parser hardening: documented rejection of unsafe XML features and oversized messages;
- transport: correct media type, TLS requirement and request-size limits.
Do not include live exploit payloads. State the expected defensive behaviour instead.
Task 5 — Produce evidence
Submit:
- an annotated request showing envelope, header and body boundaries;
- the completed XSD constraint table;
- a fault-disclosure finding with severity and remediation;
- the eight-test charter with expected results;
- a one-paragraph explanation of why schema validation does not replace authorisation.
Knowledge check
1. Does SOAP itself define the business structure inside the body?
No. SOAP defines the messaging framework and body container. Application semantics are defined by the service contract and schemas.
2. Why are namespace URIs important during assessment?
They determine the vocabulary to which an element belongs. Prefix text can change; namespace identity is carried by the URI.
3. What is the security value of a stable correlation ID?
It permits investigation and support without returning stack traces, database identifiers or other sensitive implementation details to the client.