python-Suds JIRA = SAXException

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

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

但是,当我要更新问题时,我会从肥皂水得到SAXException(大概是):

WebFault: Server raised fault:
org.xml.sax.SAXException: Found character data inside an array element while deserializing

我正在按照此处介绍的步骤进行操作:http://confluence.atlassian.com/display/JIRA/Creating+a+SOAP+Client

仅用suds替换SOAPpy调用.

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

 >>> 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'
 >>>

有人看到过这样的问题吗?

解决方法:

如果您切换到suds 3.0.9(测试版),这将得到解决.

上一篇:JIRA页面跳转快捷键gg


下一篇:jira的使用