How can I check which SUDs generate / receive in "sudo 0.4.1 jurko 5" and newer?

This question is similar to this:

How can I conclude that suds generates / receives?

The problem is that I use suds fork from Jurko and after the version "0.4.1 jurko 5" Client.last_sent() , Client.last_received() methods have been removed. So the question is, how can we replace their functionality with new suds?

PS. I know that I can reduce the level of debugging, but I would like, if possible, the ability to programmatically check the input / output.

+8
python soap suds
Mar 18 '14 at 17:49
source share
1 answer

You can use MessagePlugin for this

 from suds.plugin import MessagePlugin class LogPlugin(MessagePlugin): def sending(self, context): print(str(context.envelope)) def received(self, context): print(str(context.reply)) client = Client("http://localhost/wsdl.wsdl", plugins=[LogPlugin()]) 
+12
Jun 05 '14 at 15:48
source share



All Articles