private void CheckForCertificates(string xmlMessage, String filePath)
        {
            List <String> certificates = new List <String>();

            XDocument xmldoc          = XDocument.Parse(xmlMessage);
            XElement  deliveryElement = xmldoc.Element("DELVRY03").Element("IDOC").Element("E1EDL20");

            foreach (var deliveryLineElement in deliveryElement.Elements("E1EDL24").ToList())
            {
                XElement certificateElement = deliveryLineElement.Element("MFRPN");
                if (certificateElement != null)
                {
                    certificates.Add(certificateElement.Value);
                }
            }

            if (certificates.Count == 0)
            {
                return;
            }

            CertificateSender certSender = new CertificateSender("http://vlsrv09a:8080", "0045", "P1");

            certSender.SendCertificates(Path.GetDirectoryName(filePath), certificates);
        }
Exemple #2
0
        private void CheckForCertificates(string xmlMessage, String filePath)
        {
            List<String> certificates = new List<String>();

              XDocument xmldoc = XDocument.Parse(xmlMessage);
              XElement deliveryElement = xmldoc.Element("DELVRY03").Element("IDOC").Element("E1EDL20");

              foreach (var deliveryLineElement in deliveryElement.Elements("E1EDL24").ToList())
              {
            XElement certificateElement = deliveryLineElement.Element("MFRPN");
            if(certificateElement != null)
              certificates.Add(certificateElement.Value);
              }

              if (certificates.Count == 0)
            return;

              CertificateSender certSender = new CertificateSender("http://vlsrv09a:8080", "0045", "P1");
              certSender.SendCertificates(Path.GetDirectoryName(filePath), certificates);
        }