func (soap SOAP) SendRequest(xaddr string) (mxj.Map, error) {
	request := soap.createRequest()
	urlXAddr, err := url.Parse(xaddr)
	if err != nil {
		return nil, err
	}
	if soap.User != "" {
		urlXAddr.User = url.UserPassword(soap.User, soap.Password)
	}
	buffer := bytes.NewBuffer([]byte(request))
	req, err := http.NewRequest("POST", urlXAddr.String(), buffer)
	req.Header.Set("Content-Type", "application/soap+xml")
	req.Header.Set("Charset", "utf-8")
	resp, err := httpClient.Do(req)
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	responseBody, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return nil, err
	}
	mapXML, err := mxj.NewMapXml(responseBody)
	if err != nil {
		return nil, err
	}
	fault, _ := mapXML.ValueForPathString("Envelope.Body.Fault.Reason.Text.#text")
	if fault != "" {
		return nil, errors.New(fault)
	}
	return mapXML, nil
}
SendRequest sends SOAP request to xAddr
package onvif
import (
	"bytes"
	"crypto/sha1"
	"encoding/base64"
	"errors"
	"io/ioutil"
	"net/http"
	"net/url"
	"regexp"
	"time"
	"github.com/clbanning/mxj"
	"github.com/satori/go.uuid"
)
var httpClient = &http.Client{Timeout: time.Second * 5}
type SOAP struct {
	Body     string
	XMLNs    []string
	User     string
	Password string
	TokenAge time.Duration
}