예제 #1
0
        public void Init()
        {
            if (string.IsNullOrEmpty(_defaultIp))
            {
                LOG.Info("DefaultIp not set. Using: " + DEFAULT_IP);
                _defaultIp = DEFAULT_IP;
            }

            if (string.IsNullOrEmpty(_headerIPArgument))
            {
                LOG.Info("HeaderIPArgument not set. Using: " + DEFAULT_HEADER_IP_ARGUMENT);
                _headerIPArgument = DEFAULT_HEADER_IP_ARGUMENT;
            }

            if (string.IsNullOrEmpty(_defaultAuthMethod))
            {
                LOG.Info("DefaultAuthMethod not set. Using: " + DEFAULT_AUTH_METHOD);
                _defaultAuthMethod = DEFAULT_AUTH_METHOD;
            }

            if (_version == EndpointVersionType.Undefined)
            {
                throw new ArgumentException("Version property not set");
            }
        }
예제 #2
0
 protected void Application_Start(object sender, EventArgs e)
 {
     LOG.Info("Application_Start");
     try
     {
         _saveRequestFileName = System.Configuration.ConfigurationManager.AppSettings["RequestSaveFileName"];
     }
     catch (Exception ex)
     {
         LOG.Error("Failed to get RequestSaveFileName setting: {0}", ex.Message);
     }
 }
예제 #3
0
        private static void LogInfo(string messageFormat, params object[] args)
        {
            string message = CollectionUtils.IsNullOrEmpty(args) ? messageFormat : string.Format(messageFormat, args);

            try
            {
                EventLog.WriteEntry(ServiceName, message, EventLogEntryType.Information);
            }
            catch
            {
            }
            if (LOG != null)
            {
                try
                {
                    LOG.Info(message);
                }
                catch
                {
                }
            }
        }
예제 #4
0
        public void ProcessSubmit(string transactionId)
        {
            LOG.Info("NCT.ProcessSubmit()");
            AppendAuditLogEvent("NCT ProcessSubmit() enter");

            LazyInit();

            IList <string> dbDocIds = _transactionManager.GetAllUnprocessedDocumentDbIds(transactionId);

            if (!CollectionUtils.IsNullOrEmpty(dbDocIds))
            {
                foreach (string dbDocId in dbDocIds)
                {
                    Document document = _documentManager.GetDocument(transactionId, dbDocId, true);
                    _documentManager.SetDocumentStatus(transactionId, dbDocId, CommonTransactionStatusCode.Processed,
                                                       "Processed " + dbDocId);
                    string statusDetail;
                    CommonTransactionStatusCode status = _documentManager.GetDocumentStatus(transactionId, dbDocId,
                                                                                            out statusDetail);
                }
            }
            AddReportDocumentToTransaction(transactionId, true);
            AppendAuditLogEvent("NCT ProcessSubmit() exit");
        }