I\'m having a really tough time debugging a SharePoint SOAP call to create a list item. The SOAP body I\'m sending is:
TLDR: Try setting client.options.prettyxml = True before you try your first update call.
Holy hell, I've been wrestling with an apparently identical issue for a whole day. Assuming you were using a similar suds version (suds_jurko 0.5 here), the answer to "how do I better debug this?" to a degree, was logging:
import logging
logging.basicConfig(level=logging.INFO)
logging.getLogger('suds.client').setLevel(logging.DEBUG)
logging.getLogger('suds.transport').setLevel(logging.DEBUG)
There is a bug nestled somewhere in the sax document/elements (or adjacent to them) that was causing the "element.plain()" function to think the element was empty. When client.options.prettyxml is False, SoapClient.send() tries to use the 'plain()' method of the sax Document instead of the str() method. The result of this was that the element was getting parsed as empty, causing the UpdateListItems to fail with the "Value does not fall within the expected range," error.
ex:
MESSAGE:
b'
B5E50422-D16B-4C5F-AE19-CFBE943C6F3F
'
Note that the GetListItems() methods 'worked' for me as well, because the sax was putting an empty query element in that SOAP call, which was technically fine.
To workaround this, force SoapClient.send() to use the 'pretty' version by adding client.options.prettyxml = True somewhere before you invoke your first service.
I had not noticed the fault, because I was apparently checking my SOAP object before it got mangled; turning on the logging revealed the last minute alteration.
(I realize this is an old question, not sure if that's frowned upon; but it was the closest I was able to find to my actual problem earlier and felt it deserved an answer)