trenchmortar / python-blogger

Automatically exported from code.google.com/p/python-blogger
0 stars 0 forks source link

All xml-rpc parameters are wrapped in an extra layer of array #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In Blog.execute(), line 91, you call the xmlrpc proxy with args as an array:

            r = getattr(self.server, methodname)(args)

This causes the method to be called with a single <array>param1, param2, 
...</array> parameter containing the individual parameters rather than the 
individual parameters directly (<param>param1</param>, <param>param2</param>, 
...).

This call should be:

            r = getattr(self.server, methodname)(*args)

so the underlying xmlrpc call uses the parameters exactly as passed.

Interestingly, I found that when calling the WordPress API, WordPress handles 
the call correctly either way.  Internally, it must see there is a single array 
parameter and unwrap it.  However, when calling a different metaweblogs 
service, the parameters were not interpreted correctly as an array.  I checked 
the spec, and the non-array version is correct as far as I can tell. 

Original issue reported on code.google.com by tdter...@gmail.com on 16 Apr 2011 at 2:39