zenzic
zenzic

Reputation: 1623

Invoke an run-time SOAP method via Python/SUDS

I have a suds.client.Client object. I can invoke a method by hardcoding the method name, e.g.

myclient = suds.client.Client
result = myclient.service.some_method(args)

I would like to be able to execute a method whose name is not known until run time. I'm sure this is quite simple, but I'm pretty new to suds and it seems to do some pretty crazy magic.

Thanks

Upvotes: 1

Views: 1226

Answers (1)

user2665694
user2665694

Reputation:

result = getattr(myclient.service, 'some_method')(...)

Upvotes: 1

Related Questions