Package brisa :: Package upnp :: Module soap
[hide private]
[frames] | no frames]

Module soap

source code

Parses and builds SOAP calls transparently.

Classes [hide private]
  SOAPProxy
Proxy for making remote SOAP calls Based on twisted.web.soap.Proxy and SOAPpy.
  HTTPTransport
Wrapper class for a HTTP SOAP call.
  HTTPError
Represents an error of a HTTP request.
Functions [hide private]
string
build_soap_error(status, description='without words')
Builds an UPnP SOAP error message.
source code
string
build_soap_call(method, arguments, encoding=SOAP_ENCODING, envelope_attrib=None, typed=None)
Builds a soap call.
source code
string
__decode_result(element)
Decodes the result out of an Element.
source code
tuple
parse_soap_call(data)
Parses a soap call and returns a 4-tuple.
source code
Variables [hide private]
  NS_SOAP_ENV = "{http://schemas.xmlsoap.org/soap/envelope/}"
  NS_SOAP_ENC = "{http://schemas.xmlsoap.org/soap/encoding/}"
  NS_XSI = "{http://www.w3.org/1999/XMLSchema-instance}"
  NS_XSD = "{http://www.w3.org/1999/XMLSchema}"
  SOAP_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/"
  UPNPERRORS = {401: 'Invalid Action', 402: 'Invalid Args', 501:...
Function Details [hide private]

build_soap_error(status, description='without words')

source code 

Builds an UPnP SOAP error message.

Parameters:
  • status (integer) - error code
  • description (string) - error default description
Returns: string
soap call representing the error

build_soap_call(method, arguments, encoding=SOAP_ENCODING, envelope_attrib=None, typed=None)

source code 

Builds a soap call.

Parameters:
  • method (string or None) - method for the soap call. If set to None, the method element will be omitted and arguments will be added directly to the body (error message)
  • arguments (dict or ElementTree.Element) - arguments for the call
  • encoding (string) - encoding for the call
  • envelope_attrib (list) - envelope attribute
  • typed (boolean or None) - True if typed
Returns: string
soap call

__decode_result(element)

source code 

Decodes the result out of an Element. Returns the text, if possible.

Parameters:
  • element - element to decode the result @type element Element
Returns: string
text of the result

parse_soap_call(data)

source code 

Parses a soap call and returns a 4-tuple.

Parameters:
  • data (string) - raw soap XML call data
Returns: tuple
4-tuple (method_name, args, kwargs, namespace)

Variables Details [hide private]

UPNPERRORS

Value:
{401: 'Invalid Action', 402: 'Invalid Args', 501: 'Action Failed', 600\
: 'Argument Value Invalid', 601: 'Argument Value Out of Range', 602: '\
Optional Action Not Implemented', 603: 'Out Of Memory', 604: 'Human In\
tervention Required', 605: 'String Argument Too Long', 606: 'Action No\
t Authorized', 607: 'Signature Failure', 608: 'Signature Missing', 609\
: 'Not Encrypted', 610: 'Invalid Sequence', 611: 'Invalid Control URL'\
, 612: 'No Such Session',}