Exemplo n.º 1
0
            public void send_endServiceDelivery(int serviceID, Worldpay.Innovation.WPWithin.Rpc.Types.ServiceDeliveryToken serviceDeliveryToken, int unitsReceived)
      #endif
            {
                oprot_.WriteMessageBegin(new TMessage("endServiceDelivery", TMessageType.Call, seqid_));
                endServiceDelivery_args args = new endServiceDelivery_args();

                args.ServiceID            = serviceID;
                args.ServiceDeliveryToken = serviceDeliveryToken;
                args.UnitsReceived        = unitsReceived;
                args.Write(oprot_);
                oprot_.WriteMessageEnd();
        #if SILVERLIGHT
                return(oprot_.Transport.BeginFlush(callback, state));
        #else
                oprot_.Transport.Flush();
        #endif
            }
Exemplo n.º 2
0
            public void endServiceDelivery_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                endServiceDelivery_args args = new endServiceDelivery_args();

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

                try {
                    iface_.endServiceDelivery(args.ServiceID.Value, args.ServiceDeliveryToken, args.UnitsReceived.Value);
                } catch (Worldpay.Innovation.WPWithin.Rpc.Types.Error err) {
                    result.Err = err;
                }
                oprot.WriteMessageBegin(new TMessage("endServiceDelivery", TMessageType.Reply, seqid));
                result.Write(oprot);
                oprot.WriteMessageEnd();
                oprot.Transport.Flush();
            }
Exemplo n.º 3
0
            public void endServiceDelivery_Process(int seqid, TProtocol iprot, TProtocol oprot)
            {
                endServiceDelivery_args args = new endServiceDelivery_args();

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

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