Пример #1
0
        public static void SearchSubj(string ico)
        {
            string url = "https://eagri.cz/ssl/nosso-app/EPO/WS/v2Online/vOKOsrv.ashx";
            string req = enveloReq.Replace("#BODY#",
                                           searchSubReq.Replace("#TIME#", DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss")).Replace("#IC#", ico)
                                           );
            string token = _sign("2ahKpoxgvuQRgFVsPUCX", req);

            req = req.Replace("#TOKEN#", token);

            Soap net  = new Soap();
            var  resp = net.UploadString(url, req);
        }
Пример #2
0
        public static void SearchSubj(string ico)
        {
            string url = "https://eagri.cz/ssl/nosso-app/EPO/WS/v2Online/vOKOsrv.ashx";
            string req = icoSubReq.Replace("#ICO#", ico);

            Soap   net  = new Soap();
            string resp = net.UploadString(url, req);

            XElement xdoc = XElement.Parse(resp);
            var      res  = xdoc.DescendantNodes()
                            .Select(m => m as XElement)
                            .Where(m => m != null && m.HasAttributes)
                            .Where(m => m.Attributes()
                                   .Any(a => a.Name == "xmlns" && a.Value == "http://www.pds.eu/RDM_PUB01B") == true
                                   )
                            .ToArray();
            var serializer = new XmlSerializer(typeof(eAgri.DeMinimis.Response), "http://www.pds.eu/RDM_PUB01B");
            var xxx        = (DeMinimis.Response)serializer.Deserialize(res.First().CreateReader());
        }