README
1The class structure of these files is a little strange, and this README
2explains it.
3
4Our goal is to make JSON::RPC and XMLRPC::Lite both work with the same code.
5(That is, we want to have one WebService API, and have two frontends for it.)
6
7The problem is that these both pass different things for $self to WebService
8methods.
9
10When XMLRPC::Lite calls a method, $self is the name of the *class* the
11method is in. For example, if we call Bugzilla.version(), the first argument
12is Bugzilla::WebService::Bugzilla. So in order to have $self
13(our first argument) act correctly in XML-RPC, we make all WebService
14classes use base qw(Bugzilla::WebService).
15
16When JSON::RPC calls a method, $self is the JSON-RPC *server object*. In other
17words, it's an instance of Bugzilla::WebService::Server::JSONRPC. So we have
18Bugzilla::WebService::Server::JSONRPC inherit from Bugzilla::WebService.
19