python-zeep
python-zeep copied to clipboard
How do I start passing type and value using Python Zeep client
So here is my xml looks like
<ns0:Organization_Reference>
<ns0:ID ns0:type="Company_Reference_ID">
</ns0:ID>
</ns0:Organization_Reference>
Inside code I am doing this
'Organization_Reference': {'ID': {'type': 'Company_Reference_ID'}},
I am expecting my final XML to look like this
<ns0:Organization_Reference>
<ns0:ID ns0:type="Company_Reference_ID"> 1234
</ns0:ID>
</ns0:Organization_Reference>
My problem here is that I could not figure out how to pass the value - 1234 into the python dictionary which is required as data
@sushilatmoveworks I was facing the same issue today and came across this guide while trying to find a solution. It worked for me.
Give this a try: https://adriennedomingus.medium.com/using-zeep-to-make-soap-requests-in-python-c575ea0ee954
To summarize:
'Organization_Reference': {'ID': {'type': 'Company_Reference_ID', '_value_1': 1234}},