soap

package
v0.0.0-...-fef1834 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Codec

type Codec struct {
}

Codec creates a CodecRequest to process each request.

func NewCodec

func NewCodec() *Codec

NewCodec returns a new RESTRPC Codec.

func (*Codec) NewRequest

func (c *Codec) NewRequest(r *http.Request) rpc.CodecRequest

NewRequest returns a CodecRequest.

type CodecRequest

type CodecRequest struct {
	// contains filtered or unexported fields
}

CodecRequest decodes and encodes a single request.

func (*CodecRequest) Method

func (c *CodecRequest) Method() (string, error)

Method returns the RPC method for the current request.

The method uses a dotted notation as in "Service.Method".

func (*CodecRequest) ReadRequest

func (c *CodecRequest) ReadRequest(args interface{}) error

ReadRequest fills the request object for the RPC method.

func (*CodecRequest) WriteError

func (c *CodecRequest) WriteError(w http.ResponseWriter, status int, err error)

func (*CodecRequest) WriteResponse

func (c *CodecRequest) WriteResponse(w http.ResponseWriter, reply interface{})

WriteResponse encodes the response and writes it to the ResponseWriter.

type Fault

type Fault struct {
	XMLName     xml.Name    `xml:"Fault"`
	FaultCode   string      `xml:"faultcode"`
	FaultString string      `xml:"faultstring"`
	Detail      interface{} `xml:"detail"`
}

type Method

type Method struct {
	XMLName xml.Name
	Params  []byte `xml:",innerxml"`
}

type RequestBody

type RequestBody struct {
	//Test string `xml:",innerxml"`
	XMLName  xml.Name
	Innerxml string "innerxml"
	Method   Method `xml:",any"`
}

type RequestEnvelope

type RequestEnvelope struct {
	XMLName xml.Name    `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Header  []byte      `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header,omitempty"`
	Body    RequestBody `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
}

type ResponseBody

type ResponseBody struct {
	XMLName xml.Name    `xml:"Body"`
	Data    interface{} `xml:",innerxml"`
}

type ResponseEnvelope

type ResponseEnvelope struct {
	XMLName xml.Name    `xml:"Envelope"`
	ENV     string      `xml:"xmlns,attr"`
	Header  []byte      `xml:"Header,omitempty"`
	Body    interface{} `xml:"Body"`
}

func NewFault

func NewFault(c, s string, detail interface{}) *ResponseEnvelope

func NewResponse

func NewResponse(data interface{}) *ResponseEnvelope

Jump to

Keyboard shortcuts

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