zendframework/zf2 — pull request #730 by rafalwrzeszcz (2012-01-13 13:25:25+00:00)
Title: JSON-RPC client and some RPC severs unification 

It may not be perfect - I didn't want to change too much. For example since there is a JSON client, maybe it would be worth renaming `Zend\Json\Server` to `Zend\Json\Rpc`. But main goals of this pull request are:

- Implement basic JSON-RPC client.
- Implement common minimal interface for clients that describe plain method call.
- Unify response output handling in servers.
- Unify `$argv` argument handling in `setClass()` across all RPC servers.

Changes in existing classes:

- `Zend\Soap\Server::setClass()` now ignores second parameter - it is defined in common RPC server interface as namespace, which is not used by SOAP, but it should not be treated as `$argv` element, since it's against server interface.
- `Zend\Json\Server\Server` class now contains `setReturnResponse()` and `getReturnResponse()` methods. They are equivalent to `setAutoEmitResponse()` and `autoEmitResponse()`, but with negation - implemented to enforce common interface, but since these are redundant old methods were marked as deprecated.
- `Zend\XmlRpc\Server` class now acts like JSON and SOAP servers - can automatically output response, and this is now default behavior - to unify RPC servers.