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)); } }
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); } }