Suds 客户端忽略插件对发送方法所做的修改
Suds Client ignores modification done by plugins into sending method
我正在尝试使用插件对发送进行修改。
修改完成,但suds发送修改前的肥皂。
对我的插件进行了长时间的搜索后,我最后查看了泡沫来源。
进入client.py文件,send
函数调用插件:
plugins.message.sending(envelope=soapenv)
但是在这次调用之后 soapenv 仍然像以前一样。
作为插件return ctx,我用
打补丁
res = plugins.message.sending(envelope=soapenv)
soapenv = res.envelope
它现在按预期工作。由于 soapenv 是一个字符串,我认为 Python 按值传递它,所以我不明白如果没有这种补丁它是如何工作的。
为什么我需要这个补丁?我做错了什么?
使用的版本:
Python 2.7.9(默认值,2016 年 6 月 29 日,13:08:31)
[GCC 4.9.2] 在 linux2
泡沫(0.4)
不应使用 Sud,jurko 叉子更好并解决此问题
我正在尝试使用插件对发送进行修改。
修改完成,但suds发送修改前的肥皂。
对我的插件进行了长时间的搜索后,我最后查看了泡沫来源。
进入client.py文件,send
函数调用插件:
plugins.message.sending(envelope=soapenv)
但是在这次调用之后 soapenv 仍然像以前一样。
作为插件return ctx,我用
打补丁res = plugins.message.sending(envelope=soapenv)
soapenv = res.envelope
它现在按预期工作。由于 soapenv 是一个字符串,我认为 Python 按值传递它,所以我不明白如果没有这种补丁它是如何工作的。
为什么我需要这个补丁?我做错了什么?
使用的版本:
Python 2.7.9(默认值,2016 年 6 月 29 日,13:08:31) [GCC 4.9.2] 在 linux2
泡沫(0.4)
不应使用 Sud,jurko 叉子更好并解决此问题