我正在使用 Python 2.6 和 suds 0.3.7 与 JIRA 4.0 进行交互。
当我连接到 JIRA 服务器时,我可以很好地获得所有问题的信息。
但是,当我想更新问题时,我从 suds 中得到一个 SAXException(大概):
WebFault:服务器引发错误:org.xml.sax.SAXException:反序列化时在数组元素内找到字符数据
我正在按照此处描述的步骤操作: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'
>>>
有没有人见过这样的问题?