Example #1
0
            public void testM3_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                testM3_args args = new testM3_args();

                args.Read(iprot);
                iprot.ReadMessageEnd();
                testM3_result result = new testM3_result();

                try
                {
                    iface_.testM3(args.Dict1);
                    oprot.WriteMessageBegin(new TMessage("testM3", TMessageType.Reply, seqid));
                    result.Write(oprot);
                }
                catch (TTransportException)
                {
                    throw;
                }
                catch (Exception ex)
                {
                    Console.Error.WriteLine("Error occurred in processor:");
                    Console.Error.WriteLine(ex.ToString());
                    TApplicationException x = new TApplicationException(TApplicationException.ExceptionType.InternalError, " Internal error.");
                    oprot.WriteMessageBegin(new TMessage("testM3", TMessageType.Exception, seqid));
                    x.Write(oprot);
                }
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }
Example #2
0
            public void recv_testM3()
            {
                TMessage msg = iprot_.ReadMessageBegin();

                if (msg.Type == TMessageType.Exception)
                {
                    TApplicationException x = TApplicationException.Read(iprot_);
                    iprot_.ReadMessageEnd();
                    throw x;
                }
                testM3_result result = new testM3_result();

                result.Read(iprot_);
                iprot_.ReadMessageEnd();
                return;
            }