}
// TODO get rid of following reflection after THRIFT-1465 is fixed.
Method method = fn.getClass().getDeclaredMethod("getEmptyArgsInstance", new Class<?>[0]);
method.setAccessible(true);
set_ugi_args args = (set_ugi_args)method.invoke(fn, new Object[0]);
try {
args.read(iprot);
} catch (TProtocolException e) {
iprot.readMessageEnd();
TApplicationException x = new TApplicationException(TApplicationException.PROTOCOL_ERROR,
e.getMessage());
oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));