You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm new to Zeep, and I am updating some legacy code that is using it. I have found that the parsed Zeep dictionaries differ significantly from the raw XML response. Unfortunately, I cannot post the data here because it is sensitive. But I can post the code
I use the following to obtain the raw XML and the parsed data, by changing the raw_response flag.
client = zeep.Client(wsdl)
with client.settings(strict=False, raw_response=raw_response):
ret = client.service.read(query)
For raw response, I extract ret.content.
For parsed response, I convert everything to dictionaries via
The raw response contains ~20 fields, all filled with some meaningfull data.
The parsed response also contains those ~20 fields, but on top of that contains another ~40 fields that are not in the raw XML response, and for all of which the value is None, or sometimes an empty list. The names of those fields are meaningful, and likely appear somewhere else in the API. But it would be desired for the parsed output to match the XML exactly if possible.
I would appreciate some help in understanding where those fields are coming from, and how I could make the parsed response more consistent with the XML.
The text was updated successfully, but these errors were encountered:
aleksejs-fomins
changed the title
Zeep produces too many fields
Zeep parser produces dictionary keys that don't exist in raw XML
Apr 12, 2024
Hi, I'm new to Zeep, and I am updating some legacy code that is using it. I have found that the parsed Zeep dictionaries differ significantly from the raw XML response. Unfortunately, I cannot post the data here because it is sensitive. But I can post the code
I use the following to obtain the raw XML and the parsed data, by changing the
raw_response
flag.For raw response, I extract
ret.content
.For parsed response, I convert everything to dictionaries via
The raw response contains ~20 fields, all filled with some meaningfull data.
The parsed response also contains those ~20 fields, but on top of that contains another ~40 fields that are not in the raw XML response, and for all of which the value is None, or sometimes an empty list. The names of those fields are meaningful, and likely appear somewhere else in the API. But it would be desired for the parsed output to match the XML exactly if possible.
I would appreciate some help in understanding where those fields are coming from, and how I could make the parsed response more consistent with the XML.
The text was updated successfully, but these errors were encountered: