Documentation
¶
Overview ¶
Package envelope is responsible for encoding and decoding SOAP envelopes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrFault error = errors.New("xml fault")
ErrFault can be used as a target with errors.Is.
Functions ¶
Types ¶
type Action ¶
type Action struct { // XMLName specifies the XML element namespace (URI) and name. Together // these identify the SOAP action. XMLName xml.Name // Args is an arbitrary struct containing fields for encoding or decoding // arguments. See https://pkg.go.dev/encoding/xml@go1.17.1#Marshal and // https://pkg.go.dev/encoding/xml@go1.17.1#Unmarshal for details on // annotating fields in the structure. Args any }
Action wraps a SOAP action to be read or written as part of a SOAP envelope.
func NewRecvAction ¶
NewSendAction creates a SOAP action for receiving arguments.
func NewSendAction ¶
NewSendAction creates a SOAP action for sending with the given namespace URL, action name, and arguments.
func (*Action) MarshalXML ¶
MarshalXML implements `xml.Marshaller`.
This is an implementation detail that allows packing elements inside the action element from the struct in `a.Args`.
func (*Action) UnmarshalXML ¶
UnmarshalXML implements `xml.Unmarshaller`.
This is an implementation detail that allows unpacking elements inside the action element into the struct in `a.Args`.
type Fault ¶
type Fault struct { Code string `xml:"faultcode"` String string `xml:"faultstring"` Actor string `xml:"faultactor"` Detail FaultDetail `xml:"detail"` }
Fault implements error, and contains SOAP fault information.
type FaultDetail ¶
type FaultDetail struct {
Raw []byte `xml:",innerxml"`
}
FaultDetail carries XML-encoded application-specific Fault details.