本文整理汇总了Python中suds.bindings.multiref.MultiRef类的典型用法代码示例。如果您正苦于以下问题:Python MultiRef类的具体用法?Python MultiRef怎么用?Python MultiRef使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MultiRef类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, wsdl):
"""
@param wsdl: A wsdl.
@type wsdl: L{wsdl.Definitions}
"""
self.wsdl = wsdl
self.multiref = MultiRef()
示例2: __init__
def __init__(self, wsdl):
"""
@param wsdl: A wsdl.
@type wsdl: L{wsdl.Definitions}
"""
self.wsdl = wsdl
self.schema = wsdl.schema
self.options = Options()
self.parser = Parser()
self.multiref = MultiRef()
示例3: Binding
class Binding(object):
"""
The SOAP binding class used to process outgoing and incoming SOAP messages
per the WSDL port binding.
@ivar wsdl: The WSDL.
@type wsdl: L{suds.wsdl.Definitions}
@ivar schema: The collective schema contained within the WSDL.
@type schema: L{xsd.schema.Schema}
@ivar options: A dictionary options.
@type options: L{Options}
"""
def __init__(self, wsdl):
"""
@param wsdl: A WSDL.
@type wsdl: L{wsdl.Definitions}
"""
self.wsdl = wsdl
self.multiref = MultiRef()
def schema(self):
return self.wsdl.schema
def options(self):
return self.wsdl.options
def unmarshaller(self):
"""
Get the appropriate schema based XML decoder.
@return: Typed unmarshaller.
@rtype: L{UmxTyped}
"""
return UmxTyped(self.schema())
def marshaller(self):
"""
Get the appropriate XML encoder.
@return: An L{MxLiteral} marshaller.
@rtype: L{MxLiteral}
"""
return MxLiteral(self.schema(), self.options().xstq)
def param_defs(self, method):
"""
Get parameter definitions.
Each I{pdef} is a (I{name}, L{xsd.sxbase.SchemaObject}) tuple.
@param method: A service method.
@type method: I{service.Method}
@return: A collection of parameter definitions
@rtype: [I{pdef},...]
"""
raise Exception("not implemented")
def get_message(self, method, args, kwargs):
"""
Get a SOAP message for the specified method, args and SOAP headers.
This is the entry point for creating an outbound SOAP message.
@param method: The method being invoked.
@type method: I{service.Method}
@param args: A list of args for the method invoked.
@type args: list
@param kwargs: Named (keyword) args for the method invoked.
@type kwargs: dict
@return: The SOAP envelope.
@rtype: L{Document}
"""
content = self.headercontent(method)
header = self.header(content)
content = self.bodycontent(method, args, kwargs)
body = self.body(content)
env = self.envelope(header, body)
if self.options().prefixes:
body.normalizePrefixes()
env.promotePrefixes()
else:
env.refitPrefixes()
return Document(env)
def get_reply(self, method, replyroot):
"""
Process the I{reply} for the specified I{method} by unmarshalling it
into into Python object(s).
@param method: The name of the invoked method.
@type method: str
@param replyroot: The reply XML root node received after invoking the
specified method.
#.........这里部分代码省略.........