Creating an XML-RPC Handler
Any Java class can take XML-RPC method calls, as long as it has public methods with return types and arguments that correspond properly with XML-RPC data types.
These classes are called XML-RPC handlers, because a server gives them the job of handling an incoming request.
Every public method of the class can be called over XML-RPC, as it is implemented by Apache XML-RPC, so you must keep this in mind when declaring methods.
The LottoCounter class in Listing 25.1 can handle XML-RPC calls. This class receives lottery results, storing them in an XML file named lotto.log.