': ' . $e->getMessage() . "\n";
} catch (Zend_XmlRpc_FaultException $e) { C
// echo $e->getCode() . ': ' . $e->getMessage() . "\n";
}
A First we try the remote procedure call
B If the call fails we handle any HTTP request error
B If the error was not an HTTP error we handle any XML-RPC error
Our client will now attempt to make the remote procedure call and on failure will be able to handle HTTP
and XML-RPC errors respectively. Note that since we??™re not actually using the client in our Places application
we??™ve not gone into any detail about what we??™d do with those error messages.
As we??™ve hopefully demonstrated in this section, XML-RPC is really quite straightforward to set-up and
use and Zend_XmlRpc makes it even easier. However, like any technology, XML-RPC has its critics and in
the next section we will look at another approach to web services with Zend Rest.
11.4 Zend_Rest
At the start of this chapter we mentioned that the various Zend Framework components we??™d be working with
would include XML but that we wouldn??™t be needing to deal with it directly. The Zend_Rest section of the
manual opens by saying ???REST Web Services use service-specific XML formats??? which is true, but needs a
little clarification as REST web services don??™t actually care whether they use XML or not.
Pages:
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330