Python Zeep Client request throws error in xml exception

rishran picture rishran · Jul 7, 2016 · Viewed 8.6k times · Source

When I run the following code, I keep getting the following error: here is an error in XML document (113, 25). ---> The string '' is not a valid Boolean value. I do not understand why this is happening. Here is the documentation and according to it the boolean fields are not required.

from zeep import Client

client = Client('http://services.resumeparsing.com/ResumeService.asmx?wsdl')
response = client.service.ParseResume(request={'AccountId': 'XXXXXXX',\
    'ServiceKey':'XXXXXXXXX',\
    'FileBytes': file_bytes, 'FileText': file_text, \
    })
print(response)

Any help will be appreciated!

Answer

mvantellingen picture mvantellingen · Jul 8, 2016

Author of zeep here; which version are you using? It seems that zeep generates XML which is not valid according to the server.

You can see which XML is sent by enabling the debug log level, see http://docs.python-zeep.org/en/latest/transport.html#debugging