【发布时间】:2013-06-11 14:35:19
【问题描述】:
我们正在开发一个项目,其中 python 客户端对 Java 方法进行 RPC 调用
String uploadFile(String name, String Id)
现在,这个客户端代码必须发送一个附件!
def sendFile(self, Id, filePath):
uploadFileMethod = getattr(self.client.service, "uploadFile")
attachment_id = Id
attachment_content = (filePath, attachment_id)
with_soap_attachment(uploadFileMethod, attachment_content)
因为 suds 不支持附件,我很幸运地找到了一个提到它的脚本。脚本提到here
现在,当我执行时,我得到了错误
AttributeError: 'Client' object has no attribute 'location'
line 75, in with_soap_attachment
谁能帮助我为什么它会出现以及如何解决它?
谢谢
【问题讨论】:
-
你有创建附件的脚本吗?该链接现在已失效