Zeep version: Tested on both 1.1 and 1.4.1
WSDL example causing the issue:
https://gist.github.com/aerandir92/3cb06877af1428fb19c1be1fd59b204b
As you can see from the gist there are several elements that can be a part of the request, but only userid is required (minOccurs="1"). All other elements has minOccurs="0".
But, further down you find several elements that have a default value, which of it self isn't a problem, but Zeep always sends these values with the request, making a simple call to an update, much more complicated since we need to make sure that values aren't reset to default by Zeep.
The example I ran into, disocvering this issue, was that enableMobility defaults to False, while the User I was updating, had this set to True already, but since Zeep includes enableMobility=False in all updateUser requests, I now need to make sure that everytime I update a user that does have enableMobility = True, I must send that with the updateUser request.
So in short, Zeep shouldn't automatically fill inn elements in a requests just because it has a default value.
+1
:+1:
Just for the record, I assume you mean minOccurs instead of maxOccurs right?
Oh shoot, how did I manage to consistently wrote maxOccurs? Anyways, looks like your commit fixes it, great!
Thanks !
Most helpful comment
Oh shoot, how did I manage to consistently wrote maxOccurs? Anyways, looks like your commit fixes it, great!