soap

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeWSSecurity

func MakeWSSecurity(username string, password string, timeDiff time.Duration) wsSecurity

Types

type SOAPBody

type SOAPBody struct {
	XMLName xml.Name `xml:"http://www.w3.org/2003/05/soap-envelope Body"`

	Fault   *SOAPFault  `xml:",omitempty"`
	Content interface{} `xml:",omitempty"`
}

func (*SOAPBody) UnmarshalXML

func (b *SOAPBody) UnmarshalXML(d *xml.Decoder, _ xml.StartElement) error

type SOAPEnvelope

type SOAPEnvelope struct {
	XMLName xml.Name `xml:"http://www.w3.org/2003/05/soap-envelope Envelope"`
	Header  SOAPHeader
	Body    SOAPBody
}

func NewSOAPEnvelope

func NewSOAPEnvelope(content interface{}) *SOAPEnvelope

func (*SOAPEnvelope) AddHeader

func (envelope *SOAPEnvelope) AddHeader(header interface{})

type SOAPFault

type SOAPFault struct {
	XMLName xml.Name `xml:"http://www.w3.org/2003/05/soap-envelope Fault"`

	Code SOAPFaultCode `xml:"Code"`
}

func (*SOAPFault) Error

func (f *SOAPFault) Error() string

type SOAPFaultCode

type SOAPFaultCode struct {
	Value   string         `xml:"Value"`
	Subcode *SOAPFaultCode `xml:"Subcode,omitempty"`
}

type SOAPHeader

type SOAPHeader struct {
	XMLName xml.Name `xml:"http://www.w3.org/2003/05/soap-envelope Header"`

	Headers []interface{}
}

type SoapClient

type SoapClient struct {
	Endpoint    string
	LogRequest  func(request string)
	LogResponse func(response string)
}

func NewSoapClient

func NewSoapClient(endpoint string) *SoapClient

func (*SoapClient) Do

func (soap *SoapClient) Do(request, response interface{}, headers ...interface{}) error

Jump to

Keyboard shortcuts

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