gosoap: github.com/tiaguinho/gosoap Index | Files

package gosoap

import "github.com/tiaguinho/gosoap"


Package Files

encode.go request.go response.go soap.go wsdl.go

func GetPayloadFromError Uses

func GetPayloadFromError(err error) []byte

type Client Uses

type Client struct {
    HttpClient   *http.Client
    URL          string
    HeaderName   string
    HeaderParams HeaderParams
    Definitions  *wsdlDefinitions
    // Must be set before first request otherwise has no effect, minimum is 15 minutes.
    RefreshDefinitionsAfter time.Duration
    Username                string
    Password                string
    // contains filtered or unexported fields

Client struct hold all the informations about WSDL, request and response of the server

func SoapClient Uses

func SoapClient(wsdl string) (*Client, error)

SoapClient return new *Client to handle the requests with the WSDL

func (*Client) Call Uses

func (c *Client) Call(m string, p Params) (res *Response, err error)

Call call's the method m with Params p

func (*Client) CallByStruct Uses

func (c *Client) CallByStruct(s RequestStruct) (res *Response, err error)

Call call's by struct

func (*Client) Do Uses

func (c *Client) Do(req *Request) (res *Response, err error)

Process Soap Request

func (*Client) SetWSDL Uses

func (c *Client) SetWSDL(wsdl string)

type ErrorWithPayload Uses

type ErrorWithPayload struct {
    Payload []byte
    // contains filtered or unexported fields

type Fault Uses

type Fault struct {
    Code        string `xml:"faultcode"`
    Description string `xml:"faultstring"`
    Detail      string `xml:"detail"`

Fault response

type HeaderParams Uses

type HeaderParams map[string]interface{}

HeaderParams holds params specific to the header

type Params Uses

type Params map[string]interface{}

Params type is used to set the params in soap request

type Request Uses

type Request struct {
    Method string
    Params Params

Soap Request

func NewRequest Uses

func NewRequest(m string, p Params) *Request

func NewRequestByStruct Uses

func NewRequestByStruct(s RequestStruct) (*Request, error)

type RequestStruct Uses

type RequestStruct interface {
    SoapBuildRequest() *Request

type Response Uses

type Response struct {
    Body    []byte
    Header  []byte
    Payload []byte

Soap Response

func (*Response) Unmarshal Uses

func (r *Response) Unmarshal(v interface{}) error

Unmarshal get the body and unmarshal into the interface

type SoapBody Uses

type SoapBody struct {
    XMLName  struct{} `xml:"Body"`
    Contents []byte   `xml:",innerxml"`

SoapBody struct

type SoapEnvelope Uses

type SoapEnvelope struct {
    XMLName struct{} `xml:"Envelope"`
    Header  SoapHeader
    Body    SoapBody

SoapEnvelope struct

type SoapHeader Uses

type SoapHeader struct {
    XMLName  struct{} `xml:"Header"`
    Contents []byte   `xml:",innerxml"`

SoapHeader struct

Package gosoap imports 14 packages (graph) and is imported by 1 packages. Updated 2019-12-11. Refresh now. Tools for package owners.