public void upsertDepartment_Process(int seqid, TProtocol iprot, TProtocol oprot) { upsertDepartment_args args = new upsertDepartment_args(); args.Read(iprot); iprot.ReadMessageEnd(); upsertDepartment_result result = new upsertDepartment_result(); try { result.Success = iface_.upsertDepartment(args.Department, args.Session); } catch (UserException ex) { result.Ex = ex; } catch (SessionException se) { result.Se = se; } oprot.WriteMessageBegin(new TMessage("upsertDepartment", TMessageType.Reply, seqid)); result.Write(oprot); oprot.WriteMessageEnd(); oprot.Transport.Flush(); }
public DepartmentResponse recv_upsertDepartment() { TMessage msg = iprot_.ReadMessageBegin(); if (msg.Type == TMessageType.Exception) { TApplicationException x = TApplicationException.Read(iprot_); iprot_.ReadMessageEnd(); throw x; } upsertDepartment_result result = new upsertDepartment_result(); result.Read(iprot_); iprot_.ReadMessageEnd(); if (result.__isset.success) { return result.Success; } if (result.__isset.ex) { throw result.Ex; } if (result.__isset.se) { throw result.Se; } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "upsertDepartment failed: unknown result"); }