/// <summary>
        /// Process xml file picked up by the FileProcessor Service
        /// </summary>
        /// <param name="databaseName"></param>
        /// <param name="xmlFile"></param>
        /// <returns></returns>
        public Boolean ProcessPDFFile(String databaseName, String filePath)
        {
            //Trace.WriteLine("", "ProcessFile");
            Boolean returnValue = true;

            //try
            //{
            String fileName = Path.GetFileName(filePath);

            MessageQueue messageQueue = new MessageQueue(this.localQueuePath, this.maxQueueRetry);

            if (!messageQueue.AddMessage(databaseName, filePath, fileName))
            {
                throw new Exception("Unable to Add Message to Queue.");
            }

            messageQueue.ReceiveLastMessage();
            //}
            //catch (Exception ex)
            //{
            //Trace.WriteLine("", "ProcessFile");
            //  return false;
            //}

            return(returnValue);
        }
        /// <summary>
        /// Process xml file picked up by the FileProcessor Service
        /// </summary>
        /// <param name="databaseName"></param>
        /// <param name="xmlFile"></param>
        /// <returns></returns>
        public Boolean ProcessXmlFile(String databaseName, XDocument xmlFile, String filePath)
        {
            //Trace.WriteLine("", "ProcessFile");
            Boolean returnValue = true;

            try
            {
                String xmlFileName = Path.GetFileName(filePath);// String.Format("{0}.xml", Guid.NewGuid().ToString());

                // Send Delivery before Certificates
                MessageQueue messageQueue = new MessageQueue(this.localQueuePath, this.maxQueueRetry);
                messageQueue.AddMessage(databaseName, filePath, xmlFileName);

                //Delivery
                String xmlMessage = xmlFile.ToString();
                if (xmlMessage.Contains("DELVRY03"))
                {
                    CheckForCertificates(xmlMessage, filePath);
                }

                messageQueue.ReceiveLastMessage();
            }
            catch (Exception ex)
            {
                //Trace.WriteLine("", "ProcessFile");
                throw new Exception(ex.Message);
            }

            return(returnValue);
        }
Exemple #3
0
        /// <summary>
        /// Process xml file picked up by the FileProcessor Service
        /// </summary>
        /// <param name="databaseName"></param>
        /// <param name="xmlFile"></param>
        /// <returns></returns>
        public Boolean ProcessPDFFile(String databaseName, String filePath)
        {
            //Trace.WriteLine("", "ProcessFile");
              Boolean returnValue = true;

              //try
              //{
            String fileName = Path.GetFileName(filePath);

            MessageQueue messageQueue = new MessageQueue(this.localQueuePath, this.maxQueueRetry);
                if (!messageQueue.AddMessage(databaseName, filePath, fileName))
                    throw new Exception("Unable to Add Message to Queue.");

            messageQueue.ReceiveLastMessage();
              //}
              //catch (Exception ex)
              //{
            //Trace.WriteLine("", "ProcessFile");
              //  return false;
              //}

              return returnValue;
        }
Exemple #4
0
        /// <summary>
        /// Process xml file picked up by the FileProcessor Service
        /// </summary>
        /// <param name="databaseName"></param>
        /// <param name="xmlFile"></param>
        /// <returns></returns>
        public Boolean ProcessXmlFile(String databaseName, XDocument xmlFile, String filePath)
        {
            //Trace.WriteLine("", "ProcessFile");
              Boolean returnValue = true;

              try
              {
            String xmlFileName = Path.GetFileName(filePath);// String.Format("{0}.xml", Guid.NewGuid().ToString());

            // Send Delivery before Certificates
            MessageQueue messageQueue = new MessageQueue(this.localQueuePath, this.maxQueueRetry);
            messageQueue.AddMessage(databaseName, filePath, xmlFileName);

            //Delivery
                String xmlMessage = xmlFile.ToString();
            if (xmlMessage.Contains("DELVRY03"))
              CheckForCertificates(xmlMessage, filePath);

            messageQueue.ReceiveLastMessage();
              }
              catch (Exception ex)
              {
            //Trace.WriteLine("", "ProcessFile");
                throw new Exception(ex.Message);
              }

              return returnValue;
        }