diff options
Diffstat (limited to 'tests/axis1.py')
-rw-r--r-- | tests/axis1.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/axis1.py b/tests/axis1.py index d06823d..3ae3225 100644 --- a/tests/axis1.py +++ b/tests/axis1.py @@ -29,6 +29,7 @@ from suds import WebFault from suds.client import Client from suds.sudsobject import Object from suds.transport.https import HttpAuthenticated +from suds.plugin import Plugin errors = 0 @@ -37,6 +38,21 @@ credentials = dict(username='jortel', password='abc123') setup_logging() +class TestPlugin(Plugin): + + def onInit(self, context): + print 'init: ctx=%s' % context.__dict__ + + def onLoad(self, context): + print 'loading: ctx=%s' % context.__dict__ + + def onSend(self, context): + print 'sending: ctx=%s' % context.__dict__ + + def onReply(self, context): + print 'gotreply: ctx=%s' % context.__dict__ + + #logging.getLogger('suds.client').setLevel(logging.DEBUG) def start(url): @@ -48,7 +64,7 @@ try: url = 'http://localhost:8081/axis/services/basic-rpc-encoded?wsdl' start(url) t = HttpAuthenticated(**credentials) - client = Client(url, transport=t, cache=None) + client = Client(url, transport=t, cache=None, plugins=[TestPlugin()]) print client # # create a name object using the wsdl |