soap

package module
v0.0.0-...-b9f8808 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: MIT Imports: 8 Imported by: 0

README

soapc

Build Status GitHub license Doc Go Report Card

Description

Golang SOAP client

Why created

I needed to use SOAP for my job :(

Example

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	XMLName xml.Name    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
	Fault   *Fault      `xml:",omitempty"`
	Content interface{} `xml:",omitempty"`
}

Body body

func (*Body) UnmarshalXML

func (b *Body) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshal SOAPBody

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client SOAP client

func NewClient

func NewClient(url string, tls bool, header interface{}) *Client

NewClient return SOAP client

func (*Client) Call

func (s *Client) Call(soapAction string, request interface{}) (response []byte, err error)

Call SOAP client API call

func (*Client) CallRaw

func (s *Client) CallRaw(soapAction string, request interface{}, httpHeaders map[string]string) (response []byte, err error)

type Envelope

type Envelope struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Header  *Header  `xml:",omitempty"`
	Body    Body
}

Envelope envelope

type Fault

type Fault struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
	Code    string   `xml:"faultcode,omitempty"`
	String  string   `xml:"faultstring,omitempty"`
	Actor   string   `xml:"faultactor,omitempty"`
	Detail  string   `xml:"detail,omitempty"`
}

Fault fault

func (*Fault) Error

func (f *Fault) Error() string
type Header struct {
	XMLName xml.Name    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header"`
	Content interface{} `xml:",omitempty"`
}

Header header

func (*Header) UnmarshalXML

func (h *Header) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshal SOAPHeader

Jump to

Keyboard shortcuts

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