Setting up the server is then a fairly
straightforward process of instantiating the server object, supplying that server with the class methods that will
become its method handlers, handling the XML remote procedure call and echoing back the response.
Licensed to Menshu You
Zend Framework in Action (Ch01) Manning Publications Co. 23
One thing that you might notice is when we set the method handlers we also passed in a namespace string.
The example classes that we are working with demonstrate exactly why this is important, as both the Blogger
and Metaweblog classes contain an editPost() method which would clash without the ability to namespace
them as
metaWeblog.editPost and blogger.editPost.
With the server setup and ready to go we can now elaborate on the class methods that the server will be
using.
Creating the XML-RPC method handlers
Since the purpose of our XML-RPC server is to receive remote procedure calls, our next step is to create those
procedures. As already mentioned, we will be implementing some of the API??™s (Application Programming
Interfaces) for several of the various weblog applications so that a desktop application can work with articles
on our Places application.
First let??™s take a look at the application we will be working with; Ecto, which describes itself as ???a
feature-rich desktop blogging client for MacOSX and Windows, supporting a wide range of weblog systems???.
Pages:
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319