本文介绍了Suds + JIRA = SAXException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Python 2.6和suds 0.3.7与JIRA 4.0进行交互.

I'm using Python 2.6 and suds 0.3.7 to interact with JIRA 4.0.

当我连接到JIRA服务器时,就可以很好地获得有关所有问题的信息.

When I connect to the JIRA server, I get information on all the issues just fine.

但是,当我想更新问题时,我会从肥皂泡中得到一个SAXException:

However, when I want to update an issue, I get a SAXException from suds (presumably):

我正在执行此处描述的步骤: http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client

I'm following the steps described here: http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client

仅用sud替换SOAPpy调用.

only replacing SOAPpy calls with suds.

我尝试更新问题的尝试看起来像这样,但有例外:

My attempt to update an issue looks like this, complete with exceptions:

 >>> w="http://bugs/rpc/soap/jirasoapservice-v2?wsdl"
 >>> from suds.client import Client
 >>> client = Client(w)
 >>> auth = client.service.login("myname","mypass")
 >>> issue = client.service.getIssue(auth,"BUG-30112")
 >>> issue.summary
 This is the original summary for BUG-30112
 >>> 
 >>> client.service.updateIssue(auth,"BUG-30112",[
 ...            {"id":"summary","values":["My new summary"]}])

 Traceback (most recent call last):
   File "<interactive input>", line 2, in <module>
   File "C:\Python26\lib\suds\client.py", line 535, in __call__
     return client.invoke(args, kwargs)
   File "C:\Python26\lib\suds\client.py", line 595, in invoke
     result = self.send(msg)
   File "C:\Python26\lib\suds\client.py", line 630, in send
     result = self.failed(binding, e)
   File "C:\Python26\lib\suds\client.py", line 681, in failed
     r, p = binding.get_fault(reply)
   File "C:\Python26\lib\suds\bindings\binding.py", line 235, in get_fault
     raise WebFault(p, faultroot)
 WebFault: Server raised fault: 'org.xml.sax.SAXException: Found character data inside an array element while deserializing'
 >>>

有人看到这样的问题吗?

Has anyone seen a problem like this?

推荐答案

如果您改用suds 3.0.9(测试版)……这是唯一可解决此问题的解决方案.

This will be solved if you switch to suds 3.0.9 (beta) ... the only one to have the fix.

这篇关于Suds + JIRA = SAXException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 04:33