Skip to content Skip to sidebar Skip to footer

Creating Any Object With Python Zeep

i am pretty new to zeep, and soap. i`am trying to make client request to soap ws function. wsdl of function: - -

Solution 1:

I had the same problem today. The get_element method returns the type. To create the object you need to instantiate it. You can either do:

parameters = client.get_element('ns0:GetRetailTransactions')(params)

or you can explicitly set each property:

parameters = client.get_element('ns0:GetRetailTransactions')()
parameters.GetNotExportedOnly = 0
parameters.GetNotRetrunsOnly = 0
...

or you can pass the dict object and zeep does the conversion to the type http://docs.python-zeep.org/en/master/datastructures.html#creating-objects


Post a Comment for "Creating Any Object With Python Zeep"