Documentation
¶
Index ¶
- Constants
- func GetLocalPart(qname string) string
- func GetPrefix(qname string) string
- type BaseWSDLParser
- func (p *BaseWSDLParser) GetBindingName(op *Operation) string
- func (p *BaseWSDLParser) GetNamespaceByPrefix(prefix string) string
- func (p *BaseWSDLParser) GetOperation(name string) *Operation
- func (p *BaseWSDLParser) GetOperations() map[string]*Operation
- func (p *BaseWSDLParser) GetSchemaSystem() *xsd.SchemaSystem
- func (p *BaseWSDLParser) GetTargetNamespace() string
- func (p *BaseWSDLParser) GetWSDLDoc() *xmlquery.Node
- func (p *BaseWSDLParser) GetWSDLPath() string
- type Operation
- type WSDLDocProvider
- type WSDLParser
- type WSDLVersion
Constants ¶
const ( WSDL1Namespace = "http://schemas.xmlsoap.org/wsdl/" WSDL2Namespace = "http://www.w3.org/ns/wsdl" )
const ( StyleDocument = "document" StyleRPC = "rpc" )
Operation style constants. Mirrors the WSDL 1.1 soap:binding / soap:operation style attribute values.
Variables ¶
This section is empty.
Functions ¶
func GetLocalPart ¶
GetLocalPart extracts the local part from a QName
Types ¶
type BaseWSDLParser ¶
type BaseWSDLParser struct {
// contains filtered or unexported fields
}
BaseWSDLParser provides common functionality for WSDL parsers
func (*BaseWSDLParser) GetBindingName ¶
func (p *BaseWSDLParser) GetBindingName(op *Operation) string
GetBindingName returns the binding name for the given operation
func (*BaseWSDLParser) GetNamespaceByPrefix ¶
func (p *BaseWSDLParser) GetNamespaceByPrefix(prefix string) string
GetNamespaceByPrefix returns the namespace URI for a given prefix
func (*BaseWSDLParser) GetOperation ¶
func (p *BaseWSDLParser) GetOperation(name string) *Operation
GetOperation returns the operation by name
func (*BaseWSDLParser) GetOperations ¶
func (p *BaseWSDLParser) GetOperations() map[string]*Operation
GetOperations returns all operations
func (*BaseWSDLParser) GetSchemaSystem ¶
func (p *BaseWSDLParser) GetSchemaSystem() *xsd.SchemaSystem
GetSchemaSystem returns the schema system
func (*BaseWSDLParser) GetTargetNamespace ¶
func (p *BaseWSDLParser) GetTargetNamespace() string
GetTargetNamespace returns the target namespace of the WSDL document
func (*BaseWSDLParser) GetWSDLDoc ¶
func (p *BaseWSDLParser) GetWSDLDoc() *xmlquery.Node
GetWSDLDoc returns the WSDL document
func (*BaseWSDLParser) GetWSDLPath ¶
func (p *BaseWSDLParser) GetWSDLPath() string
type Operation ¶
type Operation struct {
Name string
SOAPAction string
Input *wsdlmsg.Message
Output *wsdlmsg.Message
Fault *wsdlmsg.Message
Binding string
// Style is the SOAP binding style for this operation, either
// "document" (default) or "rpc". Resolved from the soap:operation
// element's style attribute, falling back to the enclosing
// soap:binding element.
Style string
}
Operation represents a WSDL operation
type WSDLDocProvider ¶
type WSDLDocProvider interface {
GetWSDLDoc() *xmlquery.Node
GetWSDLPath() string
GetSchemaSystem() *xsd.SchemaSystem
}
WSDLDocProvider is the interface that provides the WSDL document
type WSDLParser ¶
type WSDLParser interface {
WSDLDocProvider
GetVersion() WSDLVersion
GetOperations() map[string]*Operation
GetOperation(name string) *Operation
ValidateRequest(operation string, body []byte) error
GetBindingName(op *Operation) string
GetTargetNamespace() string
}
WSDLParser is the interface that all WSDL parsers must implement
func NewWSDLParser ¶
func NewWSDLParser(wsdlPath string) (WSDLParser, error)
NewWSDLParser creates a new version-aware WSDL parser instance
type WSDLVersion ¶
type WSDLVersion int
WSDLVersion represents the version of WSDL being used
const ( WSDL1 WSDLVersion = iota + 1 WSDL2 )