Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DebugMode log request/response if set true DebugMode = false // DefaultRequestBuilder create simple post method DefaultRequestBuilder = func(method string, url string, body io.Reader) (*http.Request, error) { req, err := http.NewRequest(http.MethodPost, url, body) if err != nil { return nil, err } req.Header.Add("Content-Type", "text/xml; charset=\"utf-8\"") req.Header.Set("User-Agent", userAgent) return req, err } // DefaultClient used by default DefaultClient = &Client{ HTTPClient: http.DefaultClient, RequestBuilder: DefaultRequestBuilder, } )
Functions ¶
Types ¶
type Client ¶
type Client struct {
// HTTPClient used for send/recieve soap request
HTTPClient *http.Client
RequestBuilder func(method string, url string, body io.Reader) (*http.Request, error)
}
Client handle soap
type SOAPBody ¶
type SOAPBody struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
Fault *SOAPFault `xml:",omitempty"`
Content interface{} `xml:",omitempty"`
}
SOAPBody entity
func (*SOAPBody) UnmarshalXML ¶
UnmarshalXML unmarshals a given XML
type SOAPEnvelope ¶
type SOAPEnvelope struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
Header SOAPHeader
Body SOAPBody
}
SOAPEnvelope entity
type SOAPFault ¶
type SOAPFault 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"`
}
SOAPFault entity
type SOAPHeader ¶
type SOAPHeader struct {
XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header"`
Header interface{}
}
SOAPHeader entity
Click to show internal directories.
Click to hide internal directories.