Package suds :: Module client :: Class ServiceSelector
[hide private]
[frames] | no frames]

Class ServiceSelector

source code

The service selector is used to select a web service. In most cases, the wsdl only defines (1) service in which access by subscript is passed through to a PortSelector. This is also the behavior when a default service has been specified. In cases where multiple services have been defined and no default has been specified, the service is found by name (or index) and a PortSelector for the service is returned. In all cases, attribute access is forwarded to the PortSelector for either the first service or the default service (when specified).

Instance Methods [hide private]
 
__init__(self, client, services) source code
PortSelector.
__getattr__(self, name)
Request to access an attribute is forwarded to the PortSelector for either the first service or the default service (when specified).
source code
PortSelector.
__getitem__(self, name)
Provides selection of the service by name (string) or index (integer).
source code
PortSelector.
__find(self, name)
Find a service by name (string) or index (integer).
source code
PortSelector.
__ds(self)
Get the default service if defined in the options.
source code
Instance Variables [hide private]
Client __client
A suds client.
list __services
A list of wsdl services.
Method Details [hide private]

__init__(self, client, services)
(Constructor)

source code 
Parameters:
  • client (Client) - A suds client.
  • services (list) - A list of wsdl services.

__getattr__(self, name)
(Qualification operator)

source code 

Request to access an attribute is forwarded to the PortSelector for either the first service or the default service (when specified).

Parameters:
  • name (str) - The name of a method.
Returns: PortSelector.
A PortSelector.

__getitem__(self, name)
(Indexing operator)

source code 

Provides selection of the service by name (string) or index (integer). In cases where only (1) service is defined or a default has been specified, the request is forwarded to the PortSelector.

Parameters:
  • name ((int|str)) - The name (or index) of a service.
Returns: PortSelector.
A PortSelector for the specified service.

__find(self, name)

source code 

Find a service by name (string) or index (integer).

Parameters:
  • name ((int|str)) - The name (or index) of a service.
Returns: PortSelector.
A PortSelector for the found service.

__ds(self)

source code 

Get the default service if defined in the options.

Returns: PortSelector.
A PortSelector for the default service.