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

Class Client

source code

object --+
         |
        Client

A lightweight web services client. (2nd generation) API.

Instance Methods [hide private]
 
__init__(self, url, **kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
set_options(self, **kwargs)
Set options.
source code
 
add_prefix(self, prefix, uri)
Add static mapping of an XML namespace prefix to a namespace.
source code
Document
last_sent(self)
Get last sent soap message.
source code
Document
last_received(self)
Get last received soap message.
source code
Client
clone(self)
Get a shallow clone of this object.
source code
 
__str__(self)
str(x)
source code
 
__unicode__(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Methods [hide private]
[(key, value),...]
items(cls, sobject)
Extract the items from a suds object much like the items() method works on dict.
source code
dict
dict(cls, sobject)
Convert a sudsobject into a dictionary.
source code
sudsobject.Metadata
metadata(cls, sobject)
Extract the metadata from a suds object.
source code
Instance Variables [hide private]
Factory factory
The factory used to create objects.
str[2] messages
The last sent/received messages.
ServiceDefinition sd
The service definition
Service service
The service proxy used to invoke operations.
Definitions wsdl
The WSDL object.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

items(cls, sobject)
Class Method

source code 

Extract the items from a suds object much like the items() method works on dict.

Parameters:
  • sobject (Object) - A suds object
Returns: [(key, value),...]
A list of items contained in sobject.

dict(cls, sobject)
Class Method

source code 

Convert a sudsobject into a dictionary.

Parameters:
  • sobject (Object) - A suds object
Returns: dict
A python dictionary containing the items contained in sobject.

metadata(cls, sobject)
Class Method

source code 

Extract the metadata from a suds object.

Parameters:
  • sobject (Object) - A suds object
Returns: sudsobject.Metadata
The object's metadata

__init__(self, url, **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • url (str) - The URL for the WSDL.
  • kwargs - keyword arguments.
Overrides: object.__init__

See Also: Options

set_options(self, **kwargs)

source code 

Set options.

Parameters:
  • kwargs - keyword arguments.

See Also: Options

add_prefix(self, prefix, uri)

source code 

Add static mapping of an XML namespace prefix to a namespace. This is useful for cases when a wsdl and referenced schemas make heavy use of namespaces and those namespaces are subject to changed.

Parameters:
  • prefix (str) - An XML namespace prefix.
  • uri (str) - An XML namespace URI.
Raises:
  • Exception - when prefix is already mapped.

last_sent(self)

source code 

Get last sent soap message.

Returns: Document
The last sent soap message.

last_received(self)

source code 

Get last received soap message.

Returns: Document
The last received soap message.

clone(self)

source code 

Get a shallow clone of this object. The clone only shares the WSDL. All other attributes are unique to the cloned object including options.

Returns: Client
A shallow clone.

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)