I need to extend the class Client
from SUDS
module... For example i have this simple code which works fine
client = Client(wsdl, username = USERNAME, password = PASSWORD, headers = {'Content-Type': 'application/soap+xml'}, plugins = [VapixHelper()])
rules = client.service.GetActionRules()
And so i need to add some extra methods for this class so i try to do it like this:
class Vapix(Client):
def __init__(self, args):
globals().update(vars(args))
USERNAME, PASSWORD = user_data.split(':')
super(Vapix, self).__init__(wsdl, username = USERNAME, password = PASSWORD, headers = {'Content-Type': 'application/soap+xml'}, plugins = [VapixHelper()])
def setActionStatus(self, status):
print super(Vapix, self).service.GetActionRules()
And i get this error instead of the result:
Traceback (most recent call last):
File "vapix.py", line 42, in <module>
client.setActionStatus(True)
File "vapix.py", line 36, in setActionStatus
print super(Vapix, self).service.GetActionRules()
AttributeError: 'super' object has no attribute 'service'