Python+ SOAP 水 : xsd_base64Binary type?

标签 python soap jira suds

我正在尝试使用 Soap API 将一些文件附加到 Jira。 我有 python 2.6 并且 SOAPpy 不再工作,所以,我正在使用 suds。除了附件之外一切都很好...我不知道如何重写这段代码:http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client?focusedCommentId=180943#comment-180943

有什么线索吗? 我不知道如何处理像这样的复杂类型:

<complexType name="ArrayOf_xsd_base64Binary">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:byte[][]"/>
</restriction>
</complexContent>
</complexType>

非常感谢

n.

最佳答案

如果您不想使用 Java CLI,下面是如何在 Python 中添加和附件。

from suds.client import Client
client = Client(url_to_wsdl_file)
auth = client.service.login(username, password)

client.service.addBase64EncodedAttachmentsToIssue(auth, issue_key, [filename.encode("utf-8")], [open(full_path_and_filename, "rb").read().encode('base64')])

关于Python+ SOAP 水 : xsd_base64Binary type?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2283219/

相关文章:

soap - JAXB - 将 SOAP 映射到 Java 类

java - 手动验证 XML 签名

jira - 在 JIRA 中使用目标版本进行发布计划

java - 无法从类型为 ISSUE_COMMENT DELETED_AT 的 JIRA 问题事件中获取已删除的评论 ID

带 { } 的 python 格式函数

PHP SoapClient 在 WSDL 模式下重新映射 SoapAction?

python - 使用本地工作站查询公共(public) BigQuery 数据时遇到问题

jira - 人们对 jira studio 有何看法?

python - 将 Union 对象转换为间隔列表

python - 是否可以在 Django 模板语言中定位 html 元素的值?