Example #1
0
        public S2SEndPoint_processS2SMessageResponse processS2SMessage(S2SEndPoint_processS2SMessage request)
        {
            ModuleProc PROC = new ModuleProc(this.DYN_MODULE_NAME, "S2SMessagePostOperation");
            S2SEndPoint_processS2SMessageResponse result = new S2SEndPoint_processS2SMessageResponse();

            try
            {
                string rawMessage = string.Empty;

                if (request != null &&
                    request.Request != null &&
                    !request.Request.s2sMessage.IsEmpty())
                {
                    rawMessage = request.Request.s2sMessage;
                }

                result = this.ProcessMessage <S2SEndPoint_processS2SMessageResponse>(result, rawMessage);
            }
            catch (Exception ex)
            {
                Log.Exception(PROC, ex);
            }

            return(result);
        }
        private S2SEndPoint_processS2SMessageResponse FillS2SMessageToResponse(S2SEndPoint_processS2SMessageResponse result, s2sMessage target)
        {
            string response = this.GetS2SMessageResponse(target);

            result.Response = new Contracts.Dto.EBS2SMS.processS2SMessageResponse()
            {
                @return = response
            };
            return(result);
        }
        private S2SEndPoint_processS2SMessageResponse CreateS2SErrorMessageAndReturn(S2SEndPoint_processS2SMessageResponse result, ref long messageId,
                                                                                     string errorCode, string message, bool updateMessageId)
        {
            var msg = this.CreateS2SErrorMessage(ref messageId, errorCode, message);

            if (updateMessageId)
            {
                _di.UpdateSettingValue(LASTMSGID_RECV, messageId.ToString());
            }
            return(this.FillS2SMessageToResponse(result, msg));
        }