프로젝트

일반

사용자정보

개정판 ac4f1e13

IDac4f1e13b52e9641951fd7437ded61125f1b4e0b
상위 c8b87260
하위 72424099

김태성이(가) 약 5년 전에 추가함

Markup load 비동기로 변경

Change-Id: I471906b1090f7f3f0fd18e97d88a54f75fd1f673

차이점 보기:

KCOM_API/ServiceDeepView.svc.cs
2527 2527
        /// <returns></returns>
2528 2528
        private string getEnsembleSign(string user_id)
2529 2529
        {
2530
            string result = string.Empty;
2530
            string result = null;
2531 2531
            string soapurl = string.Empty;
2532

  
2532 2533
            try
2533 2534
            {
2534 2535
                string sConnString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;
2535 2536
                using (KCOMEntities Entity = new KCOMEntities(sConnString))
2536 2537
                {
2537 2538
                    var item = Entity.PROPERTIES.Where(d => d.TYPE == "UpLoadServiceUrl").FirstOrDefault();
2538
                    soapurl = item.VALUE;
2539
                }
2540
                WebClient webClient = new WebClient();
2541
                string data = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ens=\"http://EnsemblePlus.Webservice\"> <soapenv:Header/> <soapenv:Body> <ens:checkoutSignImage>"
2542
                    + "<ens:sUserNo>" + user_id + "</ens:sUserNo>"
2543
                    + "</ens:checkoutSignImage> </soapenv:Body></soapenv:Envelope>";
2544
                webClient.Headers.Add(HttpRequestHeader.ContentType, "text/xml");
2545
                webClient.Headers.Add("SOAPAction", "http://EnsemblePlus.Webservice");
2546
                var _result = webClient.UploadString(new Uri(soapurl), data);
2547
                XmlDocument xmlDoc = new XmlDocument();
2548
                xmlDoc.LoadXml(_result);
2549
                XmlNodeList list = xmlDoc.GetElementsByTagName("checkoutSignImageResponse");
2550
                foreach (XmlNode xn in list)
2551
                {
2552
                    result = xn["checkoutSignImageReturn"].InnerText;
2553
                }
2554
                if (!result.Contains("No business object"))
2555
                {
2556
                    return result;
2557
                }
2558
                else
2559
                {
2560
                    return null;
2539

  
2540
                    if (item != null)
2541
                    {
2542
                        soapurl = item.VALUE;
2543

  
2544
                        WebClient webClient = new WebClient();
2545
                        string data = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ens=\"http://EnsemblePlus.Webservice\"> <soapenv:Header/> <soapenv:Body> <ens:checkoutSignImage>"
2546
                            + "<ens:sUserNo>" + user_id + "</ens:sUserNo>"
2547
                            + "</ens:checkoutSignImage> </soapenv:Body></soapenv:Envelope>";
2548
                        webClient.Headers.Add(HttpRequestHeader.ContentType, "text/xml");
2549
                        webClient.Headers.Add("SOAPAction", "http://EnsemblePlus.Webservice");
2550
                        var _result = webClient.UploadString(new Uri(soapurl), data);
2551
                        XmlDocument xmlDoc = new XmlDocument();
2552
                        xmlDoc.LoadXml(_result);
2553
                        XmlNodeList list = xmlDoc.GetElementsByTagName("checkoutSignImageResponse");
2554

  
2555
                        foreach (XmlNode xn in list)
2556
                        {
2557
                            result = xn["checkoutSignImageReturn"].InnerText;
2558
                        }
2559

  
2560
                        if (result.Contains("No business object"))
2561
                        {
2562
                            result = null;
2563
                        }
2564
                    }
2565
                    else
2566
                    {
2567
                        result = null;
2568
                    }
2561 2569
                }
2570
             
2562 2571
            }
2563 2572
            catch (Exception ex)
2564
            {
2565
                return null;
2573
            {   
2574
                result = null;
2566 2575
            }
2567 2576

  
2568

  
2577
            return result;
2569 2578
        }
2570 2579
        #endregion
2571 2580

  

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)