soapparse

package
v0.0.0-...-57214d0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2015 License: Apache-2.0, MIT Imports: 6 Imported by: 0

README

temp

nothing

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyString           = ""
	EmptyReq              = request.Request{}
	RequestTypes []string = []string{
		"SaveImage",
		"DeleteRequest",
		"LoadZipRequest",
		"LoadImgRequest",
	}
)
View Source
var (
	ReqPrefix     = []byte(`<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><Request xmlns="http://tempuri.org/"><requestXML>`)
	ReqSuffix     = []byte(`</requestXML></Request></soap:Body></soap:Envelope>`)
	RespPrefix    = []byte("<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"><soap:Body><RequestResponse xmlns=\"http://tempuri.org/\"><RequestResult>&lt;?xml version=\"1.0\"?&gt;&lt;Response&gt;")
	RespSuffix    = []byte("&lt;/Response&gt;</RequestResult></RequestResponse></soap:Body></soap:Envelope>")
	ReqPrefixLen  = len(ReqPrefix)
	ReqSuffixLen  = len(ReqSuffix)
	RespPrefixLen = len(RespPrefix)
	RespSuffixLen = len(RespSuffix)
)
View Source
var (
	B64 = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")
)
View Source
var (
	ErrCorruptedSoapStream = errors.New("corrupted soap stream")
)
View Source
var (
	ErrIllegalType = errors.New("illegel request type")
)

Functions

func DecReq

func DecReq(req *request.Request) ([]byte, error)

func DecResp

func DecResp(header *response.Header, resp interface{}) ([]byte, error)

func EncReq

func EncReq(content []byte, req *request.Request) (err error)

func EncResp

func EncResp(content []byte, resp *response.Response) (err error)

func GetRequestTypeAndData

func GetRequestTypeAndData(content []byte) (string, request.Request, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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