The current implementation of the XMLRPC could be refactored at the code level in order to improve code readability and modularity.
In particular the component initialization/cleanup system is based on a hack that makes use of subclassing of some Apache XML RPC classes in order to perform the component setup and cleanup before and after method invocations, respectively .
This could be done in a better way by using Java reflection and a Proxy mechanism.
The XML RPC API will be specified by using an interface ,and a java.lang.reflect.InvocationHandler will be used to build a Proxy object that mediates every call to the actual implementation and performs component initialization and cleanup. The InvocationHandler will also inject XWiki relevant objects into the implementation, so that they are directly available and the don't have to be retrieved using cumbersome mechanisms (as it was done before)
Having an interface that specifies the XML RPC API is also handy because this interface can be used by XML RPC frameworks (such as the Apache one) in order to generate, on the client side, dynamic proxies that can be used to call the XML RPC methods.