[英]passing file attachments in SOAP using suds
我們正在開發一個項目,其中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不支持附件,因此我很幸運地發現一個scrpit支持它。 這里提到了腳本
現在,當我執行時,我得到了錯誤
AttributeError: 'Client' object has no attribute 'location'
line 75, in with_soap_attachment
誰能幫我為什么它來了以及如何解決它?
謝謝
對我有用的是取代
request = Request(suds_method.client.location(), request_text)
與
request = Request(soap_method.location(), request_text)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.