From a86ee3a1ca5213d5401c6425cfb0fcfc7bb15e78 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 31 Mar 2009 06:37:53 +0000 Subject: Bug 432907: Create a JSON frontend for WebServices Patch by Max Kanat-Alexander r=dkl, a=mkanat --- Bugzilla/WebService/README | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Bugzilla/WebService/README (limited to 'Bugzilla/WebService/README') diff --git a/Bugzilla/WebService/README b/Bugzilla/WebService/README new file mode 100644 index 000000000..bbe320979 --- /dev/null +++ b/Bugzilla/WebService/README @@ -0,0 +1,18 @@ +The class structure of these files is a little strange, and this README +explains it. + +Our goal is to make JSON::RPC and XMLRPC::Lite both work with the same code. +(That is, we want to have one WebService API, and have two frontends for it.) + +The problem is that these both pass different things for $self to WebService +methods. + +When XMLRPC::Lite calls a method, $self is the name of the *class* the +method is in. For example, if we call Bugzilla.version(), the first argument +is Bugzilla::WebService::Bugzilla. So in order to have $self +(our first argument) act correctly in XML-RPC, we make all WebService +classes use base qw(Bugzilla::WebService). + +When JSON::RPC calls a method, $self is the JSON-RPC *server object*. In other +words, it's an instance of Bugzilla::WebService::Server::JSONRPC. So we have +Bugzilla::WebService::Server::JSONRPC inherit from Bugzilla::WebService. -- cgit v1.2.3-24-g4f1b