String responseFieldName,
short responseFieldId,
ThriftCodec<T> responseCodec,
T result) throws Exception
{
out.writeMessageBegin(new TMessage(name, responseType, sequenceId));
TProtocolWriter writer = new TProtocolWriter(out);
writer.writeStructBegin(resultStructName);
writer.writeField(responseFieldName, (short) responseFieldId, responseCodec, result);
writer.writeStructEnd();