MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / add_methods

Method add_methods

suds/wsdl.py:225–248  ·  view source on GitHub ↗

Build method view for service

(self, service)

Source from the content-addressed store, hash-verified

223 return self.schema
224
225 def add_methods(self, service):
226 """ Build method view for service """
227 bindings = {
228 'document/literal': Document(self),
229 'rpc/literal': RPC(self),
230 'rpc/encoded': Encoded(self)
231 }
232 for p in service.ports:
233 binding = p.binding
234 ptype = p.binding.type
235 operations = p.binding.type.operations.values()
236 for name in [op.name for op in operations]:
237 m = Facade('Method')
238 m.name = name
239 m.location = p.location
240 m.binding = Facade('binding')
241 op = binding.operation(name)
242 m.soap = op.soap
243 key = '/'.join((op.soap.style, op.soap.input.body.use))
244 m.binding.input = bindings.get(key)
245 key = '/'.join((op.soap.style, op.soap.output.body.use))
246 m.binding.output = bindings.get(key)
247 op = ptype.operation(name)
248 p.methods[name] = m
249
250 def set_wrapped(self):
251 """ set (wrapped|bare) flag on messages """

Callers 1

__init__Method · 0.95

Calls 7

DocumentClass · 0.90
RPCClass · 0.90
EncodedClass · 0.90
FacadeClass · 0.90
valuesMethod · 0.80
operationMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected