Search code examples
pythonxmldebuggingsoapzsi

What is the best way to debug a SOAP interaction?


When I encounter a SOAP error, the server I communicate with only return minimal error message ("problem with parameters"). So I want to see the xml that is exchanged (send or received). I modified my SOAP library in order to print the xml echanged, but in order to do so, I had to do some retro-engineering. I could also look at the network (with wireshark or a proxy) but it doesn't work if the data exchanged are encrypted. To me this seem a hacky and painful way to do it.

What is the better way to debug SOAP interaction when your library does not provide debug logging ?

The error that I encounter is an EvaluationError non nillable element is nil, I'm in python with ZSI, if that's relevant.


Solution

  • Generally I like it best if the library itself can support debug logging (even if it needs some hacks).

    My second proposal would be a proxy. If you control the client mitmproxy's automatic certificate generation should do the job.

    I find wireshark too tedious for normal debugging though it can be helpful when you need to know exactly what was sent across the wire (and sometimes some hints can be found by checking the IP or TCP protocol bits).