예제 #1
0
파일: TaxService.cs 프로젝트: edv222/SLOTax
        private ReturnValue execute(IMessage msg, bool send)
        {
            SendingStep step = SendingStep.MessageReceived;

            try
            {
                msg.Check();
                step = SendingStep.MessageChecked;

                if (msg.MessageAction == MessageAction.Calculate)
                {
                    return(ReturnValue.ProtectiveMarkCalculated(step, msg));
                }

                msg.SurroundWithSoap();
                step = SendingStep.SoapEnvelopeGenerated;

                msg.Sign();
                step = SendingStep.MessageSigned;

                msg.Validate();
                step = SendingStep.MessageValidated;

                msg.SendToFURS();
                step = SendingStep.MessageSend;

                return(ReturnValue.Sent(step, msg));
            }
            catch (System.Exception ex)
            {
                return(ReturnValue.Error(step, msg, ex.Message));
            }
        }
예제 #2
0
        private ReturnValue execute(IMessage msg, bool send)
        {
            SendingStep step = SendingStep.MessageReceived;
              try
              {
            msg.Check();
            step = SendingStep.MessageChecked;

            if (msg.MessageAction == MessageAction.Calculate)
              return ReturnValue.ProtectiveMarkCalculated(step, msg);

            msg.SurroundWithSoap();
            step = SendingStep.SoapEnvelopeGenerated;

            msg.Sign();
            step = SendingStep.MessageSigned;

            msg.Validate();
            step = SendingStep.MessageValidated;

            msg.SendToFURS();
            step = SendingStep.MessageSend;

            return ReturnValue.Sent(step, msg);
              }
              catch (System.Exception ex)
              {
            return ReturnValue.Error(step, msg, ex.Message);
              }
        }