[Soap-Python] rpclib - NULL values

Burak Arslan burak.arslan at arskom.com.tr
Sun Nov 13 18:13:18 CET 2011


On 13.11.2011 14:36, azurIt wrote:
> Hi,
>
> i'm having little problems with NULL values send via rpclib server. It looks like that rpclib is sending this results:
> empty string = empty element (resolved to None by suds)
> None = sends no element at all (suds will NOT include this in result)
>
> I believe that suds behavior is correct because:
> 1.) i think that most clients will ignore missing elements and will not include them in parsed result
> 2.) suds cannot return empty strings [=empty elements in current rpclib behavior] (it will resolve them to None) but it's not a big deal at all - empty strings are almost the same as None. this problem applies _only_ to strings
> 3.) it's not possible to send empty elements for all other simple types cos, for example integers, simply cannot be empty (only strings can be empty). logically, empty elements for all except strings really _should_ be resolved to None.
>
> I think that rpclib should change this behavior and resolve None to empty element in all cases. Burak, what do you think ?

if you add min_occurs=1 to the responses, rpclib will return null values 
instead of omitting them. let me know if this is not the case.

burak

> azur
> _______________________________________________
> Soap mailing list
> Soap at python.org
> http://mail.python.org/mailman/listinfo/soap



More information about the Soap mailing list