A pragmatic CLI for downloading, inspecting, validating, and generating artifacts from SOAP/WSDL/XSD bundles without mutating the original contract files.
- Why this repository was created
- What problem it solves
- Installation
- Commands
- Typical workflow
- Current scope
This repository was created after a practical integration problem with a real SOAP service.
The original goal was simple: take a WSDL with external XSD schemas, import it into Postman, and get usable request bodies automatically. In practice, that flow turned out to be unreliable for more complex enterprise contracts:
- Postman could fail to resolve external schemas correctly.
- Generated request bodies could be empty or contain placeholder errors instead of valid XML.
- Naive scripts that downloaded and rewrote WSDL/XSD files could accidentally break namespace declarations and QName references.
- Once the original contract was mutated, downstream tools could no longer resolve elements and types correctly.
This repository exists to solve that class of problems in a safer and more reusable way.
Instead of relying on fragile import behavior or rewriting the original SOAP contract, soaptool keeps the original files intact, builds an internal model of the contract, and generates artifacts such as Postman collections or XML skeletons from that model.
soaptool is meant for situations where you have one or more of the following:
- a WSDL that imports multiple XSD files
- remote schemas behind authentication
- enterprise SOAP contracts with a lot of indirection
- tools that do not correctly resolve namespaces, imports, groups, or referenced elements
- a need to generate request templates without manually crafting SOAP envelopes
-
Never mutate originals. Downloaded files are stored as reference inputs.
-
Separate concerns. Downloading, resolving, validating, and generating are different stages.
-
Work from a contract model. Artifacts should be generated from a resolved representation of the service, not from ad-hoc string hacks.
-
Prefer pragmatic coverage. The target is real-world enterprise WSDL/XSD usage, not theoretical completeness.
pip install -e .For development:
pip install -e .[dev]Downloads a WSDL and all referenced schemas into a local bundle without rewriting the originals.
soaptool bundle --url "https://host/service?wsdl" --out ./soap_bundleExamples with auth:
soaptool bundle --url "https://host/service?wsdl" --out ./soap_bundle \
--user USER --password PASSsoaptool bundle --url "https://host/service?wsdl" --out ./soap_bundle \
--bearer TOKENShows discovered endpoint, operations, SOAP actions, and related input elements.
soaptool inspect --wsdl ./soap_bundle/original/service.wsdlChecks whether operations and referenced input elements can be resolved.
soaptool validate --wsdl ./soap_bundle/original/service.wsdlBuilds a Postman collection from the resolved service model.
soaptool generate postman \
--wsdl ./soap_bundle/original/service.wsdl \
--out ./service.postman_collection.jsonBuilds a SOAP XML skeleton for a given operation or element.
soaptool generate xml \
--wsdl ./soap_bundle/original/service.wsdl \
--operation searchFlightsFlex \
--out ./searchFlightsFlex.xmlsoaptool bundle --url "https://host/service?wsdl" --out ./soap_bundle
soaptool inspect --wsdl ./soap_bundle/original/service.wsdl
soaptool validate --wsdl ./soap_bundle/original/service.wsdl
soaptool generate postman --wsdl ./soap_bundle/original/service.wsdl --out ./service.postman_collection.json
soaptool generate xml --wsdl ./soap_bundle/original/service.wsdl --operation SomeOperation --out ./SomeOperation.xmlThe project is intended to support practical WSDL 1.1 and common XSD usage patterns, including:
wsdl:importxsd:importxsd:includexsd:redefinecomplexTypesimpleTypesequencechoiceallgroupattributeGroup- common extension patterns