Ejemplo n.º 1
0
            public void beginServiceDelivery_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                beginServiceDelivery_args args = new beginServiceDelivery_args();

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

                try {
                    iface_.beginServiceDelivery(args.ServiceID.Value, args.ServiceDeliveryToken, args.UnitsToSupply.Value);
                } catch (Worldpay.Innovation.WPWithin.Rpc.Types.Error err) {
                    result.Err = err;
                }
                oprot.WriteMessageBegin(new TMessage("beginServiceDelivery", TMessageType.Reply, seqid));
                result.Write(oprot);
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }
Ejemplo n.º 2
0
            public void recv_beginServiceDelivery()
            {
                TMessage msg = iprot_.ReadMessageBegin();

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

                result.Read(iprot_);
                iprot_.ReadMessageEnd();
                if (result.Err != null)
                {
                    throw result.Err;
                }
                return;
            }
Ejemplo n.º 3
0
            public void beginServiceDelivery_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                beginServiceDelivery_args args = new beginServiceDelivery_args();

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

                try
                {
                    try
                    {
                        iface_.beginServiceDelivery(args.ServiceID.Value, args.ServiceDeliveryToken, args.UnitsToSupply.Value);
                    }
                    catch (Worldpay.Innovation.WPWithin.Rpc.Types.Error err)
                    {
                        result.Err = err;
                    }
                    oprot.WriteMessageBegin(new TMessage("beginServiceDelivery", 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("beginServiceDelivery", TMessageType.Exception, seqid));
                    x.Write(oprot);
                }
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }