mvantellingen / python-zeep

A Python SOAP client
http://docs.python-zeep.org
Other
1.88k stars 586 forks source link

TypeError: argument of type 'AnyObject' is not iterable #1241

Closed kumaraswami closed 3 years ago

kumaraswami commented 3 years ago

I am unable to pass the nested request in the Zeep client. I am getting 'TypeError: argument of type 'AnyObject' is not iterable' error.

Below is my soap request.

****** ****** Below is the schema -------------------------- Below is the code -------------------- client = Client(wsdl='WSDL_URL', wsse=UsernameToken('*****', '******')) params = { 'TRAN' : { 'USER':{ 'USER_ID': '*******', 'PASSWORD': '*******', }, }, } objXmlDoc = client.get_element('ns0:GetCID') tran = xsd.AnyObject(objXmlDoc, objXmlDoc(params)) result = client.service.GetCID(tran) Error ------ File "C:\Python39\lib\site-packages\zeep\xsd\elements\indicators.py", line 237, in render if name in value: TypeError: argument of type 'AnyObject' is not iterable Referred this stackoverflow (https://stackoverflow.com/questions/47019471/creating-any-object-with-python-zeep) fix, but when tried got 'GetCIDobject is not callable' error.
kumaraswami commented 3 years ago

Issue is resolved