New submission from Adam Bielański <abg...@gmail.com>: XMLRPC standard doesn't support None/nil/null values. Element `<nil/>` was added as an extension to original protocol.
Currently sending None object through xmlrpclib produces `<value><nil/></value>` string. This causes parsing errors in more sophisticated XMLRPC parsers (like org.apache.xmlrpc for Java) which require `<nil/>` element to be declared in namespace for extensions: xmlns:ex='http://ws.apache.org/xmlrpc/namespaces/extensions' Attached patch makes xmlrpclib use that namespace for sending None values both in method calls and responses, so None value might be passed both ways. It isn't bound to use fixed prefix for extensions namespace and it also parses XML produced by original xmlrpclib (without any namespace at all), so it is backward compatible. It does its job communicating with org.apache.xmlrpc library now, using default parser on the Python side which is an improvement to original version, so I'd like to see it included in the next Python 2.x release, if possible. ---------- components: Library (Lib), XML files: xmlrpclib.diff keywords: patch messages: 121224 nosy: Adam.Bielański priority: normal severity: normal status: open title: xmlrpclib support for None isn't compliant with XMLRPC type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file19612/xmlrpclib.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10425> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com