soaputils

package
v0.0.0-...-9ea78f7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSoapFaultMessage

func GenerateSoapFaultMessage(protocolVersion string, errorMessage string, errorDescription string, code string) (string, error)

GenerateSoapFaultMessage generates and returns a SOAP fault message with given parameters.

Types

type Body

type Body struct {
	XMLName xml.Name `xml:"soapenv:Body"`
	Fault   *Fault   `xml:",omitempty"`
}

Body is a SOAP envelope body.

type Envelope

type Envelope struct {
	// XMLName is the serialized name of the soap Envelope object.
	XMLName xml.Name `xml:"soapenv:Envelope"`
	// SoapEnv is the namespace identifier for the soap Envelope.
	SoapEnv string `xml:"xmlns:soapenv,attr"`

	// These are generic namespaces used by all messages.
	XMLNSXsd string `xml:"xmlns:xsd,attr,omitempty"`
	XMLNSXsi string `xml:"xmlns:xsi,attr,omitempty"`

	// Header is used to define headers in soap Envelope.
	Header *Header
	// Body is the soap Envelop body.
	Body *Body
}

Envelope is the data structure used to keep the SOAP envelope.

type Fault

type Fault struct {
	XMLName xml.Name `xml:"soapenv:Fault"`

	Code        string `xml:"faultcode,omitempty"`
	FaultString string `xml:"faultstring,omitempty"`
	Detail      string `xml:"detail,omitempty"`
}

Fault represents the SOAP fault inside Body.

type Header struct {
	// XMLName is the serialized name of the Header object.
	XMLName xml.Name `xml:"soapenv:Header"`

	// Headers is an array of envelope headers to send.
	Headers []interface{} `xml:",omitempty"`
}

Header is used to hold SOAP header inside Envelope.

Jump to

Keyboard shortcuts

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