modulepackage
1.0.0
Repository: https://github.com/integration-system/gowsdl.git
Documentation: pkg.go.dev
# README
WSDL to Go
Generates Go code from a WSDL file.
Install
- Download binary release
- Download and build locally:
go get github.com/hooklift/gowsdl/...
- Install from Homebrew:
brew install gowsdl
Goals
- Generate idiomatic Go code as much as possible
- Support only Document/Literal wrapped services, which are WS-I compliant
- Support:
- WSDL 1.1
- XML Schema 1.0
- SOAP 1.1
- Resolve external XML Schemas
- Support external and local WSDL
Caveats
- Please keep in mind that the generated code is just a reflection of what the WSDL is like. If your WSDL has duplicated type definitions, your Go code is going to have the same and may not compile.
Usage
Usage: gowsdl [options] myservice.wsdl
-o string
File where the generated code will be saved (default "myservice.go")
-p string
Package under which code will be generated (default "myservice")
-i Skips TLS Verification
-v Shows gowsdl version
# Functions
NewGoWSDL initializes WSDL generator.
ParseLocation parses a rawloc into a Location structure.
# Structs
GoWSDL defines the struct for WSDL generator.
A Location encapsulate information about the loc of WSDL/XSD.
WSDL represents the global structure of a WSDL file.
WSDLBinding defines only a SOAP binding and its operations.
WSDLFault represents a WSDL fault message.
WSDLImport is the struct used for deserializing WSDL imports.
WSDLInput represents a WSDL input message.
WSDLMessage represents a function, which in turn has one or more parameters.
WSDLOperation represents the contract of an entire operation or function.
WSDLOutput represents a WSDL output message.
WSDLPart defines the struct for a function parameter within a WSDL.
WSDLPort defines the properties for a SOAP port only.
WSDLPortType defines the service, operations that can be performed and the messages involved.
WSDLService defines the list of SOAP services associated with the WSDL.
WSDLSOAPAddress defines the location for the SOAP service.
WSDLSOAPBinding represents a SOAP binding to the web service.
WSDLSOAPBody defines SOAP body characteristics.
WSDLSOAPFault defines a SOAP fault message characteristics.
WSDLSOAPHeader defines the header for a SOAP service.
WSDLSOAPHeaderFault defines a SOAP fault header.
WSDLSOAPOperation represents a service operation in SOAP terms.
WSDLType represents the entry point for deserializing XSD schemas used by the WSDL file.
XSDAttribute represent an element attribute.
XSDComplexContent element defines extensions or restrictions on a complex type that contains mixed content or elements only.
XSDComplexType represents a Schema complex type.
XSDElement represents a Schema element.
XSDExtension element extends an existing simpleType or complexType element.
XSDGroup element is used to define a group of elements to be used in complex type definitions.
XSDImport represents XSD imports within the main schema.
XSDInclude represents schema includes.
XSDList represents a element list.
XSDRestriction defines restrictions on a simpleType, simpleContent, or complexContent definition.
XSDRestrictionValue represents a restriction value.
XSDSchema represents an entire Schema structure.
XSDSimpleContent element contains extensions or restrictions on a text-only complex type or on a simple type as content and contains no elements.
XSDSimpleType element defines a simple type and specifies the constraints and information about the values of attributes or text-only elements.
XSDUnion represents a union element.