MCPcopy Index your code
hub / github.com/ronreiter/interactive-tutorials / invoke

Method invoke

suds/client.py:763–785  ·  view source on GitHub ↗

Send the required soap message to invoke the specified 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 result of the method invocat

(self, args, kwargs)

Source from the content-addressed store, hash-verified

761 return SimClient.injkey in kwargs.keys()
762
763 def invoke(self, args, kwargs):
764 """
765 Send the required soap message to invoke the specified method
766 @param args: A list of args for the method invoked.
767 @type args: list
768 @param kwargs: Named (keyword) args for the method invoked.
769 @type kwargs: dict
770 @return: The result of the method invocation.
771 @rtype: I{builtin} or I{subclass of} L{Object}
772 """
773 simulation = kwargs[self.injkey]
774 msg = simulation.get('msg')
775 reply = simulation.get('reply')
776 fault = simulation.get('fault')
777 if msg is None:
778 if reply is not None:
779 return self.__reply(reply, args, kwargs)
780 if fault is not None:
781 return self.__fault(fault)
782 raise Exception('(reply|fault) expected when msg=None')
783 sax = Parser()
784 msg = sax.parse(string=msg)
785 return self.send(msg)
786
787 def __reply(self, reply, args, kwargs):
788 """ simulate the reply """

Callers 1

__call__Method · 0.45

Calls 6

__replyMethod · 0.95
__faultMethod · 0.95
parseMethod · 0.95
ParserClass · 0.90
getMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected