프로젝트

일반

사용자정보

개정판 b92f142f

IDb92f142f6eb14780b6bde03439e392aa44595c2d
상위 31f18afa
하위 c517099d

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

convert service 수정
Controller 수정

Change-Id: I38994fcc4d4452d638ea74b27cc8638f4157e17a

차이점 보기:

ConvertService/ServiceBase/ServiceTestApp/MainWindow.xaml.cs
442 442

  
443 443
        private async void WebServiceTest_click(object sender, RoutedEventArgs e)
444 444
        {
445
            string cookie = "";
445
            //string cookie = "";
446 446

  
447
            var  uri = new Uri("http://localhost:9101/StationService/Rest/GetConvertItem"); // string 을 Uri 로 형변환
448
            var wReq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(uri); // WebRequest 객체 형성 및 HttpWebRequest 로 형변환
449
            wReq.Method = "POST"; // 전송 방법 "GET" or "POST"
450
            wReq.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
451
            wReq.Proxy = new System.Net.WebProxy("127.0.0.1", 8888);
452
            //wReq.ServicePoint.Expect100Continue = false;
453
            //wReq.CookieContainer = new System.Net.CookieContainer();
454
            //wReq.CookieContainer.SetCookies(uri, cookie); // 넘겨줄 쿠키가 있을때 CookiContainer 에 저장
447
            //var  uri = new Uri("http://localhost:9101/StationService/Rest/GetConvertItem"); // string 을 Uri 로 형변환
448
            //var wReq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(uri); // WebRequest 객체 형성 및 HttpWebRequest 로 형변환
449
            //wReq.Method = "POST"; // 전송 방법 "GET" or "POST"
450
            //wReq.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";
451
            //wReq.Proxy = new System.Net.WebProxy("127.0.0.1", 8888);
452
            ////wReq.ServicePoint.Expect100Continue = false;
453
            ////wReq.CookieContainer = new System.Net.CookieContainer();
454
            ////wReq.CookieContainer.SetCookies(uri, cookie); // 넘겨줄 쿠키가 있을때 CookiContainer 에 저장
455 455

  
456
            //POST 전송일 경우
456
            ////POST 전송일 경우
457 457

  
458
            string url = "http://localhost:9101/StationService/Rest/GetConvertItem";
459
            var data = new SEND
460
            {
461
                ProjectNo = "111111",
462
                DocumentID = "453"
463
            };
458
            //string url = "http://localhost:9101/StationService/Rest/GetConvertItem";
459
            //var data = new SEND
460
            //{
461
            //    ProjectNo = "111111",
462
            //    DocumentID = "453"
463
            //};
464

  
465
            //var json = _Serializer.Serialize(data);
466
            //var response2 = await Request(HttpMethod.Post, url, json, new Dictionary<string, string>());
467
            //string responseText = await response2.Content.ReadAsStringAsync();
464 468

  
465
            var json = _Serializer.Serialize(data);
466
            var response2 = await Request(HttpMethod.Post, url, json, new Dictionary<string, string>());
467
            string responseText = await response2.Content.ReadAsStringAsync();
469
            //Console.WriteLine(responseText);
470

  
471

  
472
            //using (var client = new System.Net.Http.HttpClient())
473
            //{
474
            //    var uri2 = new Uri("http://localhost:9101/StationService/Rest/GetConvertItem");
475
 
476
            //    var data2 = new SEND
477
            //    {
478
            //        ProjectNo = "111111",
479
            //        DocumentID = "453"
480
            //    };
468 481

  
469
            Console.WriteLine(responseText);
482
            //    var jsonRequest2 = JsonConvert.SerializeObject(data2);
483
            //    var stringContent = new System.Net.Http.StringContent(jsonRequest2, Encoding.UTF8, "application/json");
484
            //    var response = await client.PostAsync(uri2, stringContent);
470 485

  
486
            //    if (response.IsSuccessStatusCode)
487
            //    {
488
            //        System.Diagnostics.Debug.WriteLine(response.Content.Headers.First());
489
            //        System.Diagnostics.Debug.WriteLine(await response.Content.ReadAsStringAsync());
490
            //    }
491
            //}
471 492

  
472 493
            using (var client = new System.Net.Http.HttpClient())
473 494
            {
474
                var uri2 = new Uri("http://localhost:9101/StationService/Rest/GetConvertItem");
475
 
495
                var uri2 = new Uri("http://localhost:13009/MarkusService.svc/Rest/GetCommantList");
496

  
476 497
                var data2 = new SEND
477 498
                {
478 499
                    ProjectNo = "111111",

내보내기 Unified diff

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