wsdl

package
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2016 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package wsdl provides Web Services Description Language (WSDL) decoder.

http://www.w3schools.com/xml/xml_wsdl.asp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	XMLName  xml.Name `xml:"address"`
	Location string   `xml:"location,attr"`
}

Address of WSDL service.

type Binding

type Binding struct {
	XMLName    xml.Name            `xml:"binding"`
	Name       string              `xml:"name,attr"`
	Type       string              `xml:"type,attr"`
	Operations []*BindingOperation `xml:"operation"`
}

Binding describes SOAP to WSDL binding.

type BindingIO

type BindingIO struct {
	Parts string `xml:"parts,attr"`
	Use   string `xml:"use,attr"`
}

BindingIO describes the IO binding of SOAP operations. See IO for details.

type BindingOperation

type BindingOperation struct {
	XMLName xml.Name   `xml:"operation"`
	Name    string     `xml:"name,attr"`
	Input   *BindingIO `xml:"input>body"`
	Output  *BindingIO `xml:"output>body"`
}

BindingOperation describes the requirement for binding SOAP to WSDL operations.

type ComplexContent

type ComplexContent struct {
	XMLName   xml.Name   `xml:"complexContent"`
	Extension *Extension `xml:"extension"`
}

ComplexContent describes complex content within a complex type. Usually for extending the complex type with fields from the complex content.

type ComplexType

type ComplexType struct {
	XMLName        xml.Name        `xml:"complexType"`
	Name           string          `xml:"name,attr"`
	Abstract       bool            `xml:"abstract,attr"`
	Doc            string          `xml:"annotation>documentation"`
	AllElements    []*Element      `xml:"all>element"`
	ComplexContent *ComplexContent `xml:"complexContent"`
	Sequence       *Sequence       `xml:"sequence"`
}

ComplexType describes a complex type, such as a struct.

type Definitions

type Definitions struct {
	XMLName         xml.Name   `xml:"definitions"`
	Name            string     `xml:"name,attr"`
	TargetNamespace string     `xml:"targetNamespace,attr"`
	SOAPEnv         string     `xml:"SOAP-ENV,attr"`
	SOAPEnc         string     `xml:"SOAP-ENC,attr"`
	Service         Service    `xml:"service"`
	Imports         []*Import  `xml:"import"`
	Schema          Schema     `xml:"types>schema"`
	Messages        []*Message `xml:"message"`
	PortType        PortType   `xml:"portType"` // TODO: PortType slice?
	Binding         Binding    `xml:"binding"`
}

Definitions is the root element of a WSDL document.

func Unmarshal

func Unmarshal(r io.Reader) (*Definitions, error)

Unmarshal unmarshals WSDL documents starting from the <definitions> tag.

The Definitions object it returns is an unmarshalled version of the WSDL XML that can be introspected to generate the Web Services API.

type Element

type Element struct {
	XMLName     xml.Name     `xml:"element"`
	Name        string       `xml:"name,attr"`
	Type        string       `xml:"type,attr"`
	Min         int          `xml:"minOccurs,attr"`
	Max         string       `xml:"maxOccurs,attr"` // can be # or unbounded
	Nillable    bool         `xml:"nillable,attr"`
	ComplexType *ComplexType `xml:"complexType"`
}

Element describes an element of a given type.

type Enum

type Enum struct {
	XMLName xml.Name `xml:"enumeration"`
	Value   string   `xml:"value,attr"`
}

Enum describes one possible value for a Restriction.

type Extension

type Extension struct {
	XMLName  xml.Name  `xml:"extension"`
	Base     string    `xml:"base,attr"`
	Sequence *Sequence `xml:"sequence"`
}

Extension describes a complex content extension.

type IO

type IO struct {
	XMLName xml.Name
	Message string `xml:"message,attr"`
}

IO describes which message is linked to an operation, for input or output parameters.

type Import

type Import struct {
	XMLName   xml.Name `xml:"import"`
	Namespace string   `xml:"namespace,attr"`
	Location  string   `xml:"location,attr"`
}

Import points to another WSDL to be imported at root level.

type ImportSchema

type ImportSchema struct {
	XMLName   xml.Name `xml:"import"`
	Namespace string   `xml:"namespace,attr"`
	Location  string   `xml:"schemaLocation,attr"`
}

ImportSchema points to another WSDL to be imported at schema level.

type Message

type Message struct {
	XMLName xml.Name `xml:"message"`
	Name    string   `xml:"name,attr"`
	Parts   []*Part  `xml:"part"`
}

Message describes the data being communicated, such as functions and their parameters.

type Operation

type Operation struct {
	XMLName xml.Name `xml:"operation"`
	Name    string   `xml:"name,attr"`
	Doc     string   `xml:"documentation"`
	Input   *IO      `xml:"input"`
	Output  *IO      `xml:"output"`
}

Operation describes an operation.

type Part

type Part struct {
	XMLName xml.Name `xml:"part"`
	Name    string   `xml:"name,attr"`
	Type    string   `xml:"type,attr,omitempty"`
	Element string   `xml:"element,attr,omitempty"` // TODO: not sure omitempty
}

Part describes what Type or Element to use from the PortType.

type Port

type Port struct {
	XMLName xml.Name `xml:"port"`
	Name    string   `xml:"name,attr"`
	Binding string   `xml:"binding,attr"`
	Address Address  `xml:"address"`
}

Port for WSDL service.

type PortType

type PortType struct {
	XMLName    xml.Name     `xml:"portType"`
	Name       string       `xml:"name,attr"`
	Operations []*Operation `xml:"operation"`
}

PortType describes a set of operations.

type Restriction

type Restriction struct {
	XMLName xml.Name `xml:"restriction"`
	Base    string   `xml:"base,attr"`
	Enum    []*Enum  `xml:"enumeration"`
}

Restriction describes the WSDL type of the simple type and optionally its allowed values.

type Schema

type Schema struct {
	XMLName      xml.Name        `xml:"schema"`
	Imports      []*ImportSchema `xml:"import"`
	SimpleTypes  []*SimpleType   `xml:"simpleType"`
	ComplexTypes []*ComplexType  `xml:"complexType"`
	Elements     []*Element      `xml:"element"`
}

Schema of WSDL document.

type Sequence

type Sequence struct {
	XMLName      xml.Name       `xml:"sequence"`
	ComplexTypes []*ComplexType `xml:"complexType"`
	Elements     []*Element     `xml:"element"`
}

Sequence describes a list of elements (parameters) of a type.

type Service

type Service struct {
	Doc   string  `xml:"documentation"`
	Ports []*Port `xml:"port"`
}

Service defines a WSDL service and with a location, like an HTTP server.

type SimpleType

type SimpleType struct {
	XMLName     xml.Name     `xml:"simpleType"`
	Name        string       `xml:"name,attr"`
	Restriction *Restriction `xml:"restriction"`
}

SimpleType describes a simple type, such as string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL