'The format of a call request is:
* request metadata, a map with values of type bytes
* the message name, an Avro string, followed by
* the message parameters. Parameters are serialized according to
the message\'s request declaration.'

def write_call_request(self, message_name, request_datum, encoder):

    request_metadata = {}
    META_WRITER.write(request_metadata, encoder)
    message = self.local_protocol.messages.get(message_name)
    if (message is None):
        raise schema.AvroException(('Unknown    message:    %s' % message_name))
    encoder.write_utf8(message.name)
    self.write_request(message.request, request_datum, encoder)
