summaryrefslogtreecommitdiff
path: root/suds/bindings/binding.py
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2008-09-30 21:57:44 +0000
committerjortel <devnull@localhost>2008-09-30 21:57:44 +0000
commit54f9f5a3ea905677725d414152807577ed1ccd83 (patch)
tree8302625d083903736449336dbf37846dec15a444 /suds/bindings/binding.py
parent59509aa35c791f51bb40d39d89d26ed33978446c (diff)
downloadsuds-54f9f5a3ea905677725d414152807577ed1ccd83.tar.gz
Updated wsdl Definitions and Service: moved methods Definitions->Service. Updated client.py and bindings to support port-based, qualified method lookups as client.service.<port>.<method> for service defining multiple ports. Also, added Client.setport() to set the default port. Also added Client.merge_methods() to that even though services define multiple ports, methods can be invoked via unqualified reference as: client.service.<method> just as thought all methods defined in (1) port. All method names MUST be unique for this to work correcty. Updated entire message flow to pass the wsdl.Method. Moved ServiceDescription to separate module. WARNING: Users that have been working with service with multiple ports and don't know it will have to either do: 1) client.merge_methods() 2) client.setport(), 3) use qualified references to methods as: client.service.<port>.<method>() - or then will get a PortNotFound exception.
Diffstat (limited to 'suds/bindings/binding.py')
-rw-r--r--suds/bindings/binding.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/suds/bindings/binding.py b/suds/bindings/binding.py
index 77b4da0..02beb9b 100644
--- a/suds/bindings/binding.py
+++ b/suds/bindings/binding.py
@@ -91,8 +91,8 @@ class Binding:
"""
Get the soap message for the specified method, args and soapheaders.
This is the entry point for creating the outbound soap message.
- @param method: The name of the method being invoked.
- @type method: str
+ @param method: The method being invoked.
+ @type method: I{service.Method}
@param args: A I{list} of method arguments (parameters).
@type args: list
@param soapheaders: A list of objects to be encoded as soap-headers.
@@ -295,15 +295,14 @@ class Binding:
"""
Get a list of I{parameter definitions} (pdef) defined for the specified method.
Each I{pdef} is a tuple (I{name}, L{xsd.sxbase.SchemaObject})
- @param method: The I{name} of a method.
- @type method: str
+ @param method: A service method.
+ @type method: I{service.Method}
@param input: Defines input/output message.
@type input: boolean
@return: A list of parameter definitions
@rtype: [I{pdef},]
"""
result = []
- method = self.wsdl.method(method)
if input:
parts = method.message.input.parts
else:
@@ -323,8 +322,8 @@ class Binding:
def returned_types(self, method):
"""
Get the L{xsd.sxbase.SchemaObject} returned by the I{method}.
- @param method: The name of a method.
- @type method: str
+ @param method: A service method.
+ @type method: I{service.Method}
@return: The name of the type return by the method.
@rtype: [I{rtype},..]
"""