Python suds library throwing SAXException when updating JIRA issues

I’m working with Python 2.6 and the suds library version 0.3.7 to interact with JIRA 4.0. While retrieving issue data from JIRA is smooth and works without any issues, I face challenges when attempting to update existing issues.

Each time I try to perform an update, I encounter the following error message:

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

Below is the code that leads to this problem:

>>> service_url = "http://jira.company.com/rpc/soap/jirasoapservice-v2?wsdl"
>>> from suds.client import Client
>>> soap_client = Client(service_url)
>>> token = soap_client.service.login("username", "password")
>>> ticket = soap_client.service.getIssue(token, "PROJ-12345")
>>> ticket.summary
Original ticket summary text
>>> 
>>> soap_client.service.updateIssue(token, "PROJ-12345", [
...     {"id": "summary", "values": ["Updated summary text"]}])

Traceback (most recent call last):
  File "<stdin>", 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'

I’m wondering if anyone has faced a similar issue with XML parsing. What could be the reason behind this error?

classic xml serialization bug with suds. change your field value to a string instead of an array - use {“id”: “summary”, “values”: “Updated summary text”} without the brackets. jira’s soap parser is picky about data types and breaks when it gets arrays instead of strings.

This SAXException happens when JIRA’s SOAP service gets malformed XML during deserialization. Your field update parameters are probably structured wrong. Don’t pass a dictionary with “values” as an array - just use a single string value directly. JIRA’s SOAP API expects a simple string for the summary field, not an array structure. Try this instead:

soap_client.service.updateIssue(token, "PROJ-12345", [
    {"id": "summary", "values": "Updated summary text"}])

I’ve hit this same issue with older JIRA versions where field value formatting was way stricter. The SOAP service breaks when it gets nested arrays but expects simple values.

Had the exact same problem migrating legacy JIRA integrations. The issue is how suds builds the XML payload for field updates. Even though the docs say to use “values” as a property, the SOAP envelope gets corrupted during serialization. What worked for me was switching to a completely different field update structure. Skip the dictionary approach and use suds’ factory method to create proper RemoteFieldValue objects: python field_value = soap_client.factory.create('RemoteFieldValue') field_value.id = 'summary' field_value.values = ['Updated summary text'] soap_client.service.updateIssue(token, "PROJ-12345", [field_value]) This way suds handles the XML serialization correctly and JIRA’s parser doesn’t choke on malformed array elements. The factory method ensures the XML structure matches what JIRA 4.0 expects.