A Go SDK and CLI tool for SOAP web services. Hard fork of
way-platform/soap-go maintained in
the enuan org.
Why a hard fork: upstream does not process external contributions (the fixes
below have been open upstream for months), while enuan services need correct
code generation for real-world .NET WSDLs. See
AGENTS.md for maintenance and upstream-sync policy.
Codegen fixes (enuan):
complexContent/extensioninheritance: base fields are merged into derived types, so session tokens (BaseRequest.SessionId) and result state (ResultBase.State/Success) are no longer silently dropped.- Self-referential simple types (e.g. a local
durationrestricted fromxs:duration, as shipped in the Microsoft serialization schema of .NET WSDLs) no longer cause a stack overflow during generation. - One client method per portType operation: multiple SOAP 1.1 bindings referencing the same portType no longer produce duplicated methods.
Community fixes picked from tnymlr/soap-go
(authorship preserved in git history):
- XSD enum identifier sanitisation and stable enum output order.
- Element/type name collision handling (
Wrappersuffix). - Namespace-scoped type naming (
--namespace-prefixes) and namespace-aware element reference resolution. xs:include/xs:importsupport and cross-namespace lookups.soap:headersupport in the generated client.xs:alldecomposition and raw XML heuristic fixes.xs:dateTimewithout embedded timezone (soap.XSDDateTime).- Booleans encoded as
0/1on the wire.
Packaging:
- Single Go module: the CLI is part of the root module, so remote
installation works (upstream's
cmd/soapmodule had areplacedirective that brokego install ...@latest).
- Support for SOAP 1.1, WSDL 1.1, and XSD 1.0
- Code generation from WSDL files
- Documentation generation
The soap CLI tool can generate code, documentation, and call SOAP APIs on the fly.
$ soap
Multi-tool for SOAP APIs
USAGE
soap [command] [--flags]
CODE GENERATION
gen [--flags] Generate code for a SOAP API
DOCUMENTATION
doc [--flags] Display documentation for a SOAP API
NETWORK OPERATIONS
call [--flags] Call a SOAP action
UTILS
completion [command] Generate the autocompletion script for the specified shell
help [command] Help about any command
FLAGS
-h --help Help for soap
-v --version Version for soapgo install github.com/enuan/soap-go/cmd/soap@latestPrebuilt binaries for Linux, Windows, and Mac are available from the Releases.
MIT, see LICENSE. Original work © Way Data Technologies Oy; fork modifications © enuan.