soap

package
v0.0.0-...-cf28877 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2016 License: GPL-3.0, BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalBinBase64

func MarshalBinBase64(v []byte) (string, error)

MarshalBinBase64 marshals []byte to SOAP "bin.base64" type.

func MarshalBinHex

func MarshalBinHex(v []byte) (string, error)

MarshalBinHex marshals []byte to SOAP "bin.hex" type.

func MarshalBoolean

func MarshalBoolean(v bool) (string, error)

MarshalBoolean marshals bool to SOAP "boolean" type.

func MarshalChar

func MarshalChar(v rune) (string, error)

MarshalChar marshals rune to SOAP "char" type.

func MarshalDate

func MarshalDate(v time.Time) (string, error)

MarshalDate marshals time.Time to SOAP "date" type. Note that this converts to local time, and discards the time-of-day components.

func MarshalDateTime

func MarshalDateTime(v time.Time) (string, error)

MarshalDateTime marshals time.Time to SOAP "dateTime" type. Note that this converts to local time.

func MarshalDateTimeTz

func MarshalDateTimeTz(v time.Time) (string, error)

MarshalDateTimeTz marshals time.Time to SOAP "dateTime.tz" type.

func MarshalFixed14_4

func MarshalFixed14_4(v float64) (string, error)

MarshalFixed14_4 marshals float64 to SOAP "fixed.14.4" type.

func MarshalI1

func MarshalI1(v int8) (string, error)

func MarshalI2

func MarshalI2(v int16) (string, error)

func MarshalI4

func MarshalI4(v int32) (string, error)

func MarshalInt

func MarshalInt(v int64) (string, error)

func MarshalR4

func MarshalR4(v float32) (string, error)

func MarshalR8

func MarshalR8(v float64) (string, error)

func MarshalString

func MarshalString(v string) (string, error)

func MarshalTimeOfDay

func MarshalTimeOfDay(v TimeOfDay) (string, error)

MarshalTimeOfDay marshals TimeOfDay to the "time" type.

func MarshalTimeOfDayTz

func MarshalTimeOfDayTz(v TimeOfDay) (string, error)

MarshalTimeOfDayTz marshals TimeOfDay to the "time.tz" type.

func MarshalURI

func MarshalURI(v *url.URL) (string, error)

MarshalURI marshals *url.URL to SOAP "uri" type.

func MarshalUi1

func MarshalUi1(v uint8) (string, error)

func MarshalUi2

func MarshalUi2(v uint16) (string, error)

func MarshalUi4

func MarshalUi4(v uint32) (string, error)

func UnmarshalBinBase64

func UnmarshalBinBase64(s string) ([]byte, error)

UnmarshalBinBase64 unmarshals []byte from the SOAP "bin.base64" type.

func UnmarshalBinHex

func UnmarshalBinHex(s string) ([]byte, error)

UnmarshalBinHex unmarshals []byte from the SOAP "bin.hex" type.

func UnmarshalBoolean

func UnmarshalBoolean(s string) (bool, error)

UnmarshalBoolean unmarshals bool from the SOAP "boolean" type.

func UnmarshalChar

func UnmarshalChar(s string) (rune, error)

UnmarshalChar unmarshals rune from SOAP "char" type.

func UnmarshalDate

func UnmarshalDate(s string) (time.Time, error)

UnmarshalDate unmarshals time.Time from SOAP "date" type. This outputs the date as midnight in the local time zone.

func UnmarshalDateTime

func UnmarshalDateTime(s string) (result time.Time, err error)

UnmarshalDateTime unmarshals time.Time from the SOAP "dateTime" type. This returns a value in the local timezone.

func UnmarshalDateTimeTz

func UnmarshalDateTimeTz(s string) (result time.Time, err error)

UnmarshalDateTimeTz unmarshals time.Time from the SOAP "dateTime.tz" type. This returns a value in the local timezone when the timezone is unspecified.

func UnmarshalFixed14_4

func UnmarshalFixed14_4(s string) (float64, error)

UnmarshalFixed14_4 unmarshals float64 from SOAP "fixed.14.4" type.

func UnmarshalI1

func UnmarshalI1(s string) (int8, error)

func UnmarshalI2

func UnmarshalI2(s string) (int16, error)

func UnmarshalI4

func UnmarshalI4(s string) (int32, error)

func UnmarshalInt

func UnmarshalInt(s string) (int64, error)

func UnmarshalR4

func UnmarshalR4(s string) (float32, error)

func UnmarshalR8

func UnmarshalR8(s string) (float64, error)

func UnmarshalString

func UnmarshalString(v string) (string, error)

func UnmarshalURI

func UnmarshalURI(s string) (*url.URL, error)

UnmarshalURI unmarshals *url.URL from the SOAP "uri" type.

func UnmarshalUi1

func UnmarshalUi1(s string) (uint8, error)

func UnmarshalUi2

func UnmarshalUi2(s string) (uint16, error)

func UnmarshalUi4

func UnmarshalUi4(s string) (uint32, error)

Types

type SOAPClient

type SOAPClient struct {
	EndpointURL url.URL
	HTTPClient  http.Client
}

func NewSOAPClient

func NewSOAPClient(endpointURL url.URL) *SOAPClient

func (*SOAPClient) PerformAction

func (client *SOAPClient) PerformAction(actionNamespace, actionName string, inAction interface{}, outAction interface{}) error

PerformSOAPAction makes a SOAP request, with the given action. inAction and outAction must both be pointers to structs with string fields only.

type SOAPFaultError

type SOAPFaultError struct {
	FaultCode   string `xml:"faultcode"`
	FaultString string `xml:"faultstring"`
	Detail      string `xml:"detail"`
}

SOAPFaultError implements error, and contains SOAP fault information.

func (*SOAPFaultError) Error

func (err *SOAPFaultError) Error() string

type TimeOfDay

type TimeOfDay struct {
	// Duration of time since midnight.
	FromMidnight time.Duration

	// Set to true if Offset is specified. If false, then the timezone is
	// unspecified (and by ISO8601 - implies some "local" time).
	HasOffset bool

	// Offset is non-zero only if time.tz is used. It is otherwise ignored. If
	// non-zero, then it is regarded as a UTC offset in seconds. Note that the
	// sub-minutes is ignored by the marshal function.
	Offset int
}

TimeOfDay is used in cases where SOAP "time" or "time.tz" is used.

func UnmarshalTimeOfDay

func UnmarshalTimeOfDay(s string) (TimeOfDay, error)

UnmarshalTimeOfDay unmarshals TimeOfDay from the "time" type.

func UnmarshalTimeOfDayTz

func UnmarshalTimeOfDayTz(s string) (tod TimeOfDay, err error)

UnmarshalTimeOfDayTz unmarshals TimeOfDay from the "time.tz" type.

Jump to

Keyboard shortcuts

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