Package suds :: Package bindings :: Module document :: Class Document
[hide private]
[frames] | no frames]

Class Document

source code

binding.Binding --+
                  |
                 Document

The document/literal style. Literal is the only (@use) supported since document/encoded is pretty much dead. Although the soap specification supports multiple documents within the soap <body/>, it is very uncommon. As such, suds presents an RPC view of service methods defined with a single document parameter. This is done so that the user can pass individual parameters instead of one, single document. To support the complete specification, service methods defined with multiple documents (multiple message parts), must present a document view for that method.

Instance Methods [hide private]
[Element,..]
bodycontent(self, method, args, kwargs)
Get the content for the soap body node.
source code
[Element,...]
replycontent(self, method, body)
Get the reply body content.
source code
Element
document(self, wrapper)
Get the document root.
source code
Element
mkparam(self, method, pdef, object)
Builds a parameter for the specified method using the parameter definition (pdef) and the specified value (object).
source code
[pdef,..]
param_defs(self, method)
Get parameter definitions.
source code
[rtype,..]
returned_types(self, method)
Get the xsd.sxbase.SchemaObject returned by the method.
source code
boolean
bychoice(self, ancestry)
The ancestry contains a <choice/>
source code

Inherited from binding.Binding: __init__, body, bodypart_types, detect_fault, envelope, get_fault, get_message, get_reply, header, headercontent, headpart_types, marshaller, mkheader, replycomposite, replyfilter, replylist, unmarshaller

Instance Variables [hide private]

Inherited from binding.Binding: options, schema, wsdl

Method Details [hide private]

bodycontent(self, method, args, kwargs)

source code 

Get the content for the soap body node.

Parameters:
  • method - A service method.
  • args - method parameter values
  • kwargs - Named (keyword) args for the method invoked.
Returns: [Element,..]
The xml content for the <body/>
Overrides: binding.Binding.bodycontent
(inherited documentation)

replycontent(self, method, body)

source code 

Get the reply body content.

Parameters:
  • method - A service method.
  • body - The soap body
Returns: [Element,...]
the body content
Overrides: binding.Binding.replycontent
(inherited documentation)

document(self, wrapper)

source code 

Get the document root. For document/literal, this is the name of the wrapper element qualifed by the schema tns.

Parameters:
Returns: Element
A root element.

mkparam(self, method, pdef, object)

source code 

Builds a parameter for the specified method using the parameter definition (pdef) and the specified value (object).

Parameters:
  • method - A method name.
  • pdef - A parameter definition.
  • object - The parameter value.
Returns: Element
The parameter fragment.
Overrides: binding.Binding.mkparam
(inherited documentation)

param_defs(self, method)

source code 

Get parameter definitions. Each pdef is a tuple (name, xsd.sxbase.SchemaObject)

Parameters:
  • method - A servic emethod.
Returns: [pdef,..]
A collection of parameter definitions
Overrides: binding.Binding.param_defs
(inherited documentation)

returned_types(self, method)

source code 

Get the xsd.sxbase.SchemaObject returned by the method.

Parameters:
  • method - A service method.
Returns: [rtype,..]
The name of the type return by the method.
Overrides: binding.Binding.returned_types
(inherited documentation)

bychoice(self, ancestry)

source code 

The ancestry contains a <choice/>

Parameters:
  • ancestry (list) - A list of ancestors.
Returns: boolean
True if contains <choice/>