3 From its [home page](http://www.xmlrpc.com/), XML-RPC is described as:
5 > "...remote procedure calling using HTTP as the transport and XML as the
6 > encoding. XML-RPC is designed to be as simple as possible, while allowing
7 > complex data structures to be transmitted, processed and returned."
9 zend-xmlrpc provides support for both consuming remote XML-RPC services and
10 providing XML-RPC servers.
14 The following demonstrates the most basic use case for `Zend\XmlRpc\Server`:
20 * Say hello to someone.
22 * @param string $name Who to greet
25 public function sayHello($name = 'Stranger')
27 return sprintf("Hello %s!", $name);
31 $server = new Zend\XmlRpc\Server;
33 // Our Greeter class will be called "greeter" from the client:
34 $server->setClass('Greeter', 'greeter');
38 > ### Docblock annotations are required
40 > Function and method docblocks containing parameter and return value
41 > annotations **are required** when exposing them via `Zend\XmlRpc\Server`. The
42 > values will be used to validate method parameters and provide method
43 > signatures to clients.
45 > Docblock descriptions will also be used to provide method help text.
47 The following demonstrates an XML-RPC client that can consume the above service:
50 $client = new Zend\XmlRpc\Client('http://example.com/xmlrpcserver.php');
52 echo $client->call('greeter.sayHello');
53 // will output "Hello Stranger!"
55 echo $client->call('greeter.sayHello', ['Dude']);
56 // will output "Hello Dude!"