Documentation ¶
Index ¶
- Constants
- Variables
- func FilterEmptyTags(w io.Writer, r io.Reader) error
- func FindBody(dec *xml.Decoder) (xml.StartElement, error)
- func SOAPCall(ctx context.Context, destURL, action string, reqBody string, resp interface{}, ...) error
- func SOAPCallWithHeader(ctx context.Context, destURL string, customize func(req *http.Request), ...) error
- func SOAPCallWithHeaderClient(ctx context.Context, client *http.Client, destURL string, ...) error
- func Ungzb64(s string) string
- type Annotation
- type SOAPFault
- type SOAPHandler
Constants ¶
View Source
const ( SOAPHeader = `` /* 130-byte string literal not displayed */ SOAPBody = `</soapenv:Header><soapenv:Body>` )
Variables ¶
View Source
var (
DefaultCallTimeout = time.Minute
)
View Source
var DefaultTimeout = 5 * time.Minute
Functions ¶
func FindBody ¶
func FindBody(dec *xml.Decoder) (xml.StartElement, error)
FindBody will find the first StartElement after soap:Body.
func SOAPCall ¶ added in v0.9.0
func SOAPCall(ctx context.Context, destURL, action string, reqBody string, resp interface{}, Log func(...interface{}) error) error
SOAPCall destURL with SOAPAction=action, decoding the response body into resp.
func SOAPCallWithHeader ¶ added in v0.11.0
func SOAPCallWithHeader(ctx context.Context, destURL string, customize func(req *http.Request), action, soapHeader, reqBody string, resp interface{}, Log func(...interface{}) error, ) error
SOAPCallWithHeader calls with the given SOAP- and extra header and action.
func SOAPCallWithHeaderClient ¶ added in v0.11.1
func SOAPCallWithHeaderClient(ctx context.Context, client *http.Client, destURL string, customize func(req *http.Request), action, soapHeader, reqBody string, resp interface{}, Log func(...interface{}) error, ) error
SOAPCallWithHeader calls with the given SOAP- and extra header and action.
Types ¶
type Annotation ¶ added in v0.3.0
type SOAPFault ¶ added in v0.4.6
type SOAPFault struct { XMLName xml.Name `xml:"SOAP-ENV:Fault"` Code string `xml:"faultcode,omitempty"` String string `xml:"faultstring,omitempty"` Actor string `xml:"faultactor,omitempty"` Detail string `xml:"detail>ExceptionDetail,omitempty"` }
SOAPFault fault
type SOAPHandler ¶
type SOAPHandler struct { grpcer.Client WSDL string Log func(keyvals ...interface{}) error Locations []string DecodeInput func(*string, *xml.Decoder, *xml.StartElement) (interface{}, error) EncodeOutput func(*xml.Encoder, interface{}) error DecodeHeader func(context.Context, *xml.Decoder, *xml.StartElement) (context.Context, func(context.Context, io.Writer, error) error, error) Timeout time.Duration // contains filtered or unexported fields }
SOAPHandler is a http.Handler which proxies SOAP requests to the Client. WSDL is served on GET requests.
func (*SOAPHandler) DecodeRequest ¶ added in v0.12.1
func (h *SOAPHandler) DecodeRequest(ctx context.Context, r *http.Request) (grpcer.RequestInfo, interface{}, error)
func (*SOAPHandler) Input ¶ added in v0.2.4
func (h *SOAPHandler) Input(name string) interface{}
func (*SOAPHandler) ServeHTTP ¶
func (h *SOAPHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.