Package suds :: Module servicedefinition :: Class ServiceDefinition
[hide private]
[frames] | no frames]

Class ServiceDefinition

source code

A service definition provides an object used to generate a textual description of a service.

Instance Methods [hide private]
 
__init__(self, wsdl, service) source code
 
pushprefixes(self)
Add our prefixes to the wsdl so that when users invoke methods and reference the prefixes, the will resolve properly.
source code
 
addports(self)
Look through the list of service ports and construct a list of tuples where each tuple is used to describe a port and it's list of methods as: (port, [method]).
source code
(port, [method])
findport(self, port)
Find and return a port tuple for the specified port.
source code
 
getprefixes(self)
Add prefixes foreach namespace referenced by parameter types.
source code
 
paramtypes(self)
get all parameter types
source code
 
publictypes(self)
get all public types
source code
 
nextprefix(self)
Get the next available prefix.
source code
(prefix, uri).
getprefix(self, u)
Get the prefix for the specified namespace (uri)
source code
str
xlate(self, type)
Get a (namespace) translated qualified name for specified type.
source code
str
description(self)
Get a textual description of the service for which this object represents.
source code
 
__str__(self) source code
 
__unicode__(self) source code
Instance Variables [hide private]
[port-tuple,..] ports
A list of port-tuple: (port, [(method-name, pdef)])
[(prefix,uri),..] prefixes
A list of remapped prefixes.
suds.wsdl.Service service
The service object.
[Type,..] types
A list of type definitions
wsdl.Definitions wsdl
A wsdl.
Method Details [hide private]

__init__(self, wsdl, service)
(Constructor)

source code 
Parameters:
  • wsdl (Definitions) - A wsdl object
  • service (str) - A service name.

addports(self)

source code 

Look through the list of service ports and construct a list of tuples where each tuple is used to describe a port and it's list of methods as: (port, [method]). Each method is tuple: (name, [pdef,..] where each pdef is a tuple: (param-name, type).

findport(self, port)

source code 

Find and return a port tuple for the specified port. Created and added when not found.

Parameters:
  • port (service.Port) - A port.
Returns: (port, [method])
A port tuple.

nextprefix(self)

source code 

Get the next available prefix. This means a prefix starting with 'ns' with a number appended as (ns0, ns1, ..) that is not already defined on the wsdl document.

getprefix(self, u)

source code 

Get the prefix for the specified namespace (uri)

Parameters:
  • u (str) - A namespace uri.
Returns: (prefix, uri).
The namspace.

xlate(self, type)

source code 

Get a (namespace) translated qualified name for specified type.

Parameters:
  • type (suds.xsd.sxbasic.SchemaObject) - A schema type.
Returns: str
A translated qualified name.

description(self)

source code 

Get a textual description of the service for which this object represents.

Returns: str
A textual description.