Thursday, May 31, 2012

another python suds tip

If you are having trouble creating nested XML for array objects like this:

while using suds' Factory methods, you should try to create the struct from scratch, by passing whatever method is appropriate a list of dictionaries or whatever nested structure applies:


facepalms: a million

suds empty tag issue

I just posted a really nice Stack Overflow solution about this:
The general point is that although Suds is an awesome python library that lets you connect to SOAP clients (I mean, really? welcome to the 21st century, people) with relative ease, it has the bad habit of adding empty tags for optional properties of objects. This tends to confuse (poorly written) API endpoints.

facepalms: 6