soap

package
v0.0.0-...-c40b7de Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2013 License: MIT Imports: 6 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) WriteResponse

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

WriteResponse encodes the response and writes it to the ResponseWriter.

The err parameter is the error resulted from calling the RPC method, or nil if there was no error.

type Fault

type Fault struct {
	XMLName     xml.Name    `xml:"SOAP-ENV: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:"SOAP-ENV:Body"`
	Data    interface{} `xml:",innerxml"`
}

type ResponseEnvelope

type ResponseEnvelope struct {
	XMLName xml.Name    `xml:"SOAP-ENV:Envelope"`
	ENV     string      `xml:"xmlns:SOAP-ENV,attr"`
	Header  []byte      `xml:"SOAP-ENV:Header,omitempty"`
	Body    interface{} `xml:"SOAP-ENV: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