gosoap

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 8 Imported by: 0

README

gosoap

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	//XMLName xml.Name  `xml:"wsse:Security"`
	XMLName   xml.Name `xml:"wsa:Action"`
	Operation string   `xml:",chardata"`
}

Action type

func NewAction

func NewAction(key, value string) Action

NewAction get a new Action Section

type SOAPBody added in v0.0.13

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 added in v0.0.13

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

UnmarshalXML the response body https://github.com/faceterteam/onvif4go/blob/master/soap/types.go#L46 https://play.golang.org/p/FRzdAFrXZ1

type SOAPEnvelope added in v0.0.13

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

func NewSOAPEnvelope added in v0.0.13

func NewSOAPEnvelope(content interface{}) *SOAPEnvelope

type SOAPFault added in v0.0.13

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

	Code   SOAPFaultCode   `xml:",omitempty"`
	Reason SOAPFaultReason `xml:",omitempty"`
	Detail SOAPFaultDetail `xml:",omitempty"`
}

func (*SOAPFault) String added in v0.0.13

func (fault *SOAPFault) String() string

type SOAPFaultCode added in v0.0.13

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

type SOAPFaultDetail added in v0.0.13

type SOAPFaultDetail struct {
	Text string `xml:"Text"`
}

type SOAPFaultReason added in v0.0.13

type SOAPFaultReason struct {
	Text string `xml:"Text"`
}

type SOAPFaultSubCode added in v0.0.13

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

type SOAPHeader added in v0.0.13

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

	Headers []interface{}
}

type Security

type Security struct {
	//XMLName xml.Name  `xml:"wsse:Security"`
	XMLName xml.Name `xml:"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd Security"`
	Auth    wsAuth
}

Security type :XMLName xml.Name `xml:"http://purl.org/rss/1.0/modules/content/ encoded"`

func NewSecurity

func NewSecurity(username, passwd string) Security

NewSecurity get a new security

type SoapMessage

type SoapMessage string

SoapMessage type from string

func NewEmptySOAP

func NewEmptySOAP() SoapMessage

NewEmptySOAP return new SoapMessage

func NewSOAP

func NewSOAP(headContent []*etree.Element, bodyContent []*etree.Element, namespaces map[string]string) SoapMessage

NewSOAP Get a new soap message

func (*SoapMessage) AddAction

func (msg *SoapMessage) AddAction()

AddAction Header handling for soapMessage

func (*SoapMessage) AddBodyContent

func (msg *SoapMessage) AddBodyContent(element *etree.Element)

AddBodyContent for Envelope

func (*SoapMessage) AddBodyContents

func (msg *SoapMessage) AddBodyContents(elements []*etree.Element)

AddBodyContents for Envelope body

func (*SoapMessage) AddHeaderContent

func (msg *SoapMessage) AddHeaderContent(element *etree.Element)

AddHeaderContent for Envelope body

func (*SoapMessage) AddHeaderContents

func (msg *SoapMessage) AddHeaderContents(elements []*etree.Element)

AddHeaderContents for Envelope body

func (*SoapMessage) AddRootNamespace

func (msg *SoapMessage) AddRootNamespace(key, value string)

AddRootNamespace for Envelope body

func (*SoapMessage) AddRootNamespaces

func (msg *SoapMessage) AddRootNamespaces(namespaces map[string]string)

AddRootNamespaces for Envelope body

func (*SoapMessage) AddStringBodyContent

func (msg *SoapMessage) AddStringBodyContent(data string)

AddStringBodyContent for Envelope

func (*SoapMessage) AddStringHeaderContent

func (msg *SoapMessage) AddStringHeaderContent(data string) error

AddStringHeaderContent for Envelope body

func (*SoapMessage) AddWSSecurity

func (msg *SoapMessage) AddWSSecurity(username, password string)

AddWSSecurity Header for soapMessage

func (SoapMessage) Body

func (msg SoapMessage) Body() string

Body return body from Envelope

func (SoapMessage) String

func (msg SoapMessage) String() string

func (SoapMessage) StringIndent

func (msg SoapMessage) StringIndent() string

StringIndent handle indent

Jump to

Keyboard shortcuts

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