summaryrefslogtreecommitdiff
path: root/suds/bindings/binding.py
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2008-07-24 15:09:25 +0000
committerjortel <devnull@localhost>2008-07-24 15:09:25 +0000
commit2a0e615db66feda3260161a426ef0a904e0fc796 (patch)
treea7460e4f0313f6c421961d011ea17962845cbadd /suds/bindings/binding.py
parentede713dc562c3059da71e917b419d0bdf716e9e2 (diff)
downloadsuds-2a0e615db66feda3260161a426ef0a904e0fc796.tar.gz
Fix <xs:import schemaLocation=/>; Implement <wsdl:import/> and retrofit the rest of suds that reference the WSDL classes as the entire wsdl.py module was refactored; Remove cProfile imports; Update sudsobject.Printer to prevent circular references caused when object has an attribute that either directly/indirectly references itself (prints as (MyObject)... when detected
Diffstat (limited to 'suds/bindings/binding.py')
-rw-r--r--suds/bindings/binding.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/suds/bindings/binding.py b/suds/bindings/binding.py
index 377b465..9b9cb4d 100644
--- a/suds/bindings/binding.py
+++ b/suds/bindings/binding.py
@@ -55,10 +55,12 @@ class Binding:
def use_literal(self):
""" set the input message encoding to "literal" """
self.encoded = False
+ return self
def use_encoded(self):
""" set the input message encoding to "encoded" """
self.encoded = True
+ return self
def get_message(self, method_name, args, soapheaders):
"""get the soap message for the specified method and args"""
@@ -198,14 +200,6 @@ class Binding:
method = Element('%s:%s' % (prefix, name))
return method
- def part_refattr(self):
- """
- Get the part attribute that defines the part's I{type}.
- @return: An attribute name.
- @rtype: basestring
- """
- pass
-
def part_types(self, method, input=True):
"""
Get a list of I{parameter definitions} defined for the specified method.
@@ -218,15 +212,19 @@ class Binding:
@rtype: [I{definition},]
"""
result = []
- for p in self.wsdl.get_parts(method, input):
- ref = p.get(self.part_refattr())
- qref = qualified_reference(ref, p, self.wsdl.tns)
+ operation = self.wsdl.binding().type.operation(method)
+ if input:
+ parts = operation.input.parts
+ else:
+ parts = operation.output.parts
+ for p in parts:
+ qref = p.xsref()
query = Query(qref)
pt = query.execute(self.schema)
if pt is None:
raise TypeNotFound(qref)
if input:
- result.append((p.get('name'), pt))
+ result.append((p.name, pt))
else:
result.append(pt)
return result