Fix GeneratedService and RpcClient to be independent of wire protocol.
diff --git a/lib/src/protobuf/generated_service.dart b/lib/src/protobuf/generated_service.dart
index 27d5105..13b5882 100644
--- a/lib/src/protobuf/generated_service.dart
+++ b/lib/src/protobuf/generated_service.dart
@@ -9,12 +9,15 @@
   // TODO: Place server specific information in this class.
 }
 
-/// Abstract class used to implement a Service API.
+/// The implementation of a Service API.
 ///
-/// The protoc compiler generates subclasses of this class containing abstract
-/// methods for each defined service method and a handleCall method that
-/// dispatches to the corresponding abstract method.
+/// The protoc plugin generates subclasses (with names ending with ServiceBase)
+/// that extend GeneratedService and dispatch requests by method.
 abstract class GeneratedService {
-  Future<List<int>> handleCall(
-      ServerContext ctx, String methodName, List<int> request);
+  /// Creates a message object that can deserialize a request.
+  GeneratedMessage createRequest(String methodName);
+
+  /// Dispatches the call. The request object should come from [createRequest].
+  Future<GeneratedMessage> handleCall(
+      ServerContext ctx, String methodName, GeneratedMessage request);
 }
diff --git a/lib/src/protobuf/rpc_client.dart b/lib/src/protobuf/rpc_client.dart
index b3fb97d..cc6c3ee 100644
--- a/lib/src/protobuf/rpc_client.dart
+++ b/lib/src/protobuf/rpc_client.dart
@@ -9,11 +9,23 @@
   // TODO: Place client side specific information here.
 }
 
-/// Client interface.
+/// Client-side transport for making calls to a service.
 ///
-/// This must be implemented by protobuf clients which are passed to the
-/// generated client stub class at construction.
+/// Subclasses implement whatever serialization and networking is needed
+/// to make a call. They should serialize the request to binary or JSON as
+/// appropriate and merge the response into the supplied emptyResponse
+/// before returning it.
+///
+/// The protoc plugin generates a client-side stub for each service that
+/// takes an RpcClient as a constructor parameter.
 abstract class RpcClient {
-  Future<List<int>> Invoke(
-      ClientContext ctx, String methodName, List<int> request);
+
+  /// Sends a request to a server and returns the reply.
+  ///
+  /// The implementation should serialize the request as binary or JSON, as
+  /// appropriate. It should merge the reply into [emptyResponse] and
+  /// return it.
+  Future<GeneratedMessage> invoke(
+      ClientContext ctx, String serviceName, String methodName,
+      GeneratedMessage request, GeneratedMessage emptyResponse);
 }