如何在 Python(版本 2.1)中显示 ZSI.ServiceProxy 的传出和传入 SOAP 消息?
几个月前,我问了同样的问题,但在旧版本的 ZSI 的背景下(如何在 Python 中显示 ZSI.ServiceProxy 的传出和传入 SOAP 消息?)。现在,在新版本的 ZSI 2.1 中没有 tacefile
参数)。我试图找到新版本的文档,但失败了。 有人知道如何显示 ZSI 2.1 生成和接收的 SOAP 消息吗? 提前谢谢您:-)
Couple months ago I have asked the same question but in the context of older version of ZSI (How to display outcoming and incoming SOAP message for ZSI.ServiceProxy in Python?). Now, in the new version of ZSI 2.1 there is no tacefile
parameter). I tried to find a documentation for the new version but I faild. Does anyone know how to display the SOAP messages generated and received by ZSI 2.1? Thank you in advance :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为了调试,我找到了使用wireshark来跟踪TCP包的干扰较少的解决方案。它看起来像这样:
For debugging I have found less interfering solution using wireshark to trace the TCP packages. It looks like that:
我也有同样的问题。我的解决方法是修改ZSI附带的dispatch.py文件。
我为我的应用程序创建了一个日志记录函数 (logmessage),它将 SOAP 消息存储到数据库中,然后在必要时添加该函数。但我不记得我使用的 ZSI 版本。不过,您应该能够在代码中轻松找到这些函数。 进行其他编辑以来,我有大约 L 数
自从我在站点包目录中的 Dispatch.py 文件中
L156 - 记录 SOAP 响应
L168 - 记录 SOAP 错误
L277 - 记录请求
I had this same problem. My workaround was to modify the dispatch.py file that comes with ZSI.
I created a logging function (logmessage) for my app that would store SOAP messages into a database and then added that function where necessary. I do not recall the ZSI version I was using however. You should be able to find these functions pretty easily in the code though. I ave approximate L numbers since i made other edits
in Dispatch.py file in your site-packages directory
L156 - logs SOAP responses
L168 - logs SOAP errors
L277 - logs requests