프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / FinalService / FinalServiceBase / CommonLib / WebServiceProxy.cs @ 42d49521

이력 | 보기 | 이력해설 | 다운로드 (1.22 KB)

1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.ServiceModel;
5
using System.Text;
6

    
7
namespace CommonLib
8
{
9
    public class WebServiceProxy
10
    {
11
        private static MARKUS_API.ServiceDeepViewClient _client;
12
        
13
        public static MARKUS_API.ServiceDeepViewClient WebService()
14
        {
15
            if(_client == null)
16
            {
17
                string apiurl = CommonLib.Common.GetConfigString("MARKUS_API", "URL", "");
18
                BasicHttpBinding _binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly);
19
                _binding.MaxBufferSize = 2147483647;
20
                _binding.MaxReceivedMessageSize = 2147483647;
21
                _binding.OpenTimeout = new TimeSpan(0, 1, 0);
22
                _binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
23
                _binding.CloseTimeout = new TimeSpan(0, 5, 0);
24
                _binding.SendTimeout = new TimeSpan(0, 5, 0);
25
                _binding.TextEncoding = System.Text.Encoding.UTF8;
26
                _binding.TransferMode = TransferMode.Buffered;
27
                _client = new MARKUS_API.ServiceDeepViewClient(_binding, new EndpointAddress(apiurl));
28
            }
29
            return _client;
30
        }
31
        
32
    }
33
}
클립보드 이미지 추가 (최대 크기: 500 MB)