Example #1
0
 public soap_WinFormFactory
 (
     ref ServiceHost server,
     Uri server_url,
     string NameSpace,
     Type serviceType,
     Type ServiceInterfaceType,
     ServiceBindingType bindType,
     MessageCredentialType MessageCredentialType,
     string certificatePath,
     string certificatePassword,
     deleErrReporter errReporter
 )
 {
     this.server = server;
     // 인증서 설정
     SetCertificate(certificatePath, certificatePassword);
     this.bindType    = bindType;
     this.service     = null;
     this.serviceType = serviceType;
     this.errReporter = errReporter;
     server.Faulted  += delegate
     {
         this.server.Abort();
         this.server = new ServiceHost(serviceType);
         CreateService(server_url, NameSpace, ServiceInterfaceType, MessageCredentialType);
     };
     CreateService(server_url, NameSpace, ServiceInterfaceType, MessageCredentialType);
     server = this.server;
 }
Example #2
0
        /// <summary>
        /// 생성과 동시에 서비스생성
        /// </summary>
        /// <param name="errReporter"></param>
        /// <param name="ServiceURL"></param>
        /// <param name="ServiceNameSpace"></param>
        internal WCFModel(deleErrReporter errReporter, string ServiceURL, String ServiceNameSpace, Type serviceType, Type InterfaceType)
        {
            this.errReporter      = errReporter;
            this.ServiceURL       = ServiceURL;
            this.ServiceNameSpace = ServiceNameSpace;

            this.host = new ServiceHost(typeof(SQLWebService));
            try
            {
                this.soapService = new SOAPManager
                                   (
                    ref this.host,
                    SOAPServerType.winform,
                    new Uri(ServiceURL),
                    ServiceNameSpace,
                    ServiceBindingType.WSHttpBinding,
                    typeof(SQLWebService),
                    typeof(ISQLWebService),
                    errReporter
                                   );
            }
            catch (Exception)
            {
                throw;
            }
        }
Example #3
0
 public SOAPManager(
     ref ServiceHost host,
     SOAPServerType soap_server,
     Uri ServiceURL,
     String NameSpace,
     ServiceBindingType bindType,
     MessageCredentialType MessageCredentialType,
     string cerPath,
     string cerPassword,
     object service,
     deleErrReporter errReporter)
 {
     this.errReporter = errReporter;
     switch (soap_server)
     {
         case SOAPServerType.winform:
             SOAPFactory = new soap_WinFormFactory(ref host,ServiceURL, NameSpace, service, bindType, MessageCredentialType, cerPath,cerPassword,new deleErrReporter(ThrowErr));
             break;
         case SOAPServerType.WAS:
             break;
         case SOAPServerType.iis:
             break;
         default:
             break;
     }
 }
Example #4
0
 /// <summary>
 /// 윈폼 상에서 웹서비스 구축
 /// </summary>
 /// <param name="bindType">바인드 타입</param>
 /// <param name="service">웹서비스로 제공할 객체의 타입 : 싱글톤 타입 안됨</param>
 public soap_WinFormFactory
 (
     ref ServiceHost server,
     Uri server_url,
     string NameSpace,
     Type serviceType,
     Type ServiceInterfaceType,
     ServiceBindingType bindType,
     deleErrReporter errReporter
 )
 {
     this.server      = server;
     this.bindType    = bindType;
     this.service     = null;
     this.serviceType = serviceType;
     this.errReporter = errReporter;
     server.Faulted  += delegate
     {
         this.server.Abort();
         this.server = new ServiceHost(serviceType);
         CreateService(server_url, NameSpace, ServiceInterfaceType);
     };
     CreateService(server_url, NameSpace, ServiceInterfaceType);
     server = this.server;
 }
Example #5
0
        /// <summary>
        /// 생성과 동시에 서비스생성
        /// </summary>
        /// <param name="errReporter"></param>
        /// <param name="ServiceURL"></param>
        /// <param name="ServiceNameSpace"></param>
        internal WCFModel(deleErrReporter errReporter, string ServiceURL, String ServiceNameSpace, Type serviceType, Type InterfaceType)
        {
            this.errReporter = errReporter;
            this.ServiceURL = ServiceURL;
            this.ServiceNameSpace = ServiceNameSpace;

            try
            {
                this.host = new ServiceHost(typeof(WebService));
                this.soapService = new SOAPManager
                    (
                    ref this.host,
                    SOAPServerType.winform,
                    new Uri(ServiceURL),
                    ServiceNameSpace,
                    ServiceBindingType.WSHttpBinding,
                    typeof(WebService),
                    typeof(IWebService),
                    errReporter
                    );
            }
            catch (Exception ex)
            {

                throw ex;
            }
        }
Example #6
0
        public SOAPManager
        (
            ref ServiceHost host,
            SOAPServerType soap_server,
            Uri ServiceURL,
            String NameSpace,
            ServiceBindingType bindType,
            Type serviceType,
            Type InterfaceType,
            deleErrReporter errReporter)
        {
            this.errReporter = errReporter;
            switch (soap_server)
            {
            case SOAPServerType.winform:
                SOAPFactory = new soap_WinFormFactory(ref host, ServiceURL, NameSpace, serviceType, InterfaceType, bindType, new deleErrReporter(ThrowErr));
                break;

            case SOAPServerType.WAS:
                break;

            case SOAPServerType.iis:
                break;

            default:
                break;
            }
        }
Example #7
0
        public SOAPManager
        (
            ref ServiceHost host,
            SOAPServerType soap_server,
            Uri ServiceURL,
            String NameSpace,
            ServiceBindingType bindType,
            MessageCredentialType MessageCredentialType,
            string cerPath,
            string cerPassword,
            object service,
            deleErrReporter errReporter)
        {
            this.errReporter = errReporter;
            switch (soap_server)
            {
            case SOAPServerType.winform:
                SOAPFactory = new soap_WinFormFactory(ref host, ServiceURL, NameSpace, service, bindType, MessageCredentialType, cerPath, cerPassword, new deleErrReporter(ThrowErr));
                break;

            case SOAPServerType.WAS:
                break;

            case SOAPServerType.iis:
                break;

            default:
                break;
            }
        }
Example #8
0
 public soap_WinFormFactory(
     ref ServiceHost server,
     Uri server_url,
     string NameSpace,
     Type serviceType,
     Type ServiceInterfaceType,
     ServiceBindingType bindType,
     MessageCredentialType MessageCredentialType,
     string certificatePath,
     string certificatePassword,
     deleErrReporter errReporter
     )
 {
     this.server = server;
     // 인증서 설정
     SetCertificate(certificatePath,certificatePassword);
     this.bindType = bindType;
     this.service = null;
     this.serviceType = serviceType;
     this.errReporter = errReporter;
     server.Faulted += delegate
     {
         this.server.Abort();
         this.server = new ServiceHost(serviceType);
         CreateService(server_url, NameSpace, ServiceInterfaceType, MessageCredentialType);
     };
     CreateService(server_url, NameSpace, ServiceInterfaceType, MessageCredentialType);
     server = this.server;
 }
Example #9
0
 public static ServiceConnController getInstance(deleErrReporter errReporter, MessageCredentialType MessageSecurityType, string certPath, string certPassword)
 {
     if (instance == null)
     {
         instance = new ServiceConnController(errReporter, MessageSecurityType, certPath, certPassword);
     }
     return(instance);
 }
Example #10
0
 public static ServiceConnController getInstance(deleErrReporter errReporter)
 {
     if (instance == null)
     {
         instance = new ServiceConnController(errReporter);
     }
     return(instance);
 }
Example #11
0
 private ServiceConnController(deleErrReporter errReporter)
 {
     this.ServiceDic            = new Dictionary <string, WCFModel>();
     this.serviceNameSpace      = "http://GISHitpanWebService.org";
     this.ServiceType           = typeof(SQLWebService);
     this.ServiceInterface      = typeof(ISQLWebService);
     this.errReporter           = errReporter;
     this.MessageCredentialType = MessageCredentialType.None;
 }
Example #12
0
 private ServiceConnController(deleErrReporter errReporter)
 {
     this.ServiceDic = new Dictionary<string, WCFModel>();
     this.serviceNameSpace = "http://GISHitpanWebService.org";
     this.ServiceType = typeof(SQLWebService);
     this.ServiceInterface = typeof(ISQLWebService);
     this.errReporter = errReporter;
     this.MessageCredentialType = MessageCredentialType.None;
 }
Example #13
0
 private ServiceConnController(deleErrReporter errReporter, MessageCredentialType MessageCredentialType, string certPath, string certPassword)
 {
     this.MessageCredentialType = MessageCredentialType;
     this.certPath         = certPath;
     this.certPassword     = certPassword;
     this.ServiceDic       = new Dictionary <string, WCFModel>();
     this.serviceNameSpace = "http://GISHitpanWebService.org";
     this.ServiceType      = typeof(SQLWebService);
     this.ServiceInterface = typeof(ISQLWebService);
     this.errReporter      = errReporter;
 }
Example #14
0
 private ServiceConnController(deleErrReporter errReporter, MessageCredentialType MessageCredentialType, string certPath, string certPassword)
 {
     this.MessageCredentialType=MessageCredentialType;
     this.certPath=certPath;
     this.certPassword=certPassword;
     this.ServiceDic = new Dictionary<string, WCFModel>();
     this.serviceNameSpace = "http://GISHitpanWebService.org";
     this.ServiceType = typeof(SQLWebService);
     this.ServiceInterface = typeof(ISQLWebService);
     this.errReporter = errReporter;
 }
Example #15
0
        /// <summary>
        /// 생성과 동시에 서비스생성
        /// </summary>
        /// <param name="errReporter"></param>
        /// <param name="ServiceURL"></param>
        /// <param name="ServiceNameSpace"></param>
        internal WCFModel(
            deleErrReporter errReporter,
            string ServiceURL,
            String ServiceNameSpace,
            MessageCredentialType MessageSecurityType,
            string certPath,
            string certPassword,
            deleSecurityCustomizer SecurityCustomizer,
            Type serviceType,
            Type InterfaceType
            )
        {
            this.errReporter = errReporter;
            this.ServiceURL = ServiceURL;
            this.ServiceNameSpace = ServiceNameSpace;
            this.host = new ServiceHost(serviceType);
            this.host = SecurityCustomizer(this.host);
            try
            {
                this.soapService = new SOAPManager
                    (
                    ref host,
                    SOAPServerType.winform,
                    new Uri(ServiceURL),
                    ServiceNameSpace,
                    ServiceBindingType.WSDualHttpBinding,
                    MessageSecurityType,
                    certPath,
                    certPassword,
                    serviceType,
                    InterfaceType,
                    errReporter
                    );
            }
            catch (Exception)
            {

                throw;
            }
        }
Example #16
0
 /// <summary>
 /// 생성과 동시에 서비스생성
 /// </summary>
 /// <param name="errReporter"></param>
 /// <param name="ServiceURL"></param>
 /// <param name="ServiceNameSpace"></param>
 internal WCFModel
 (
     deleErrReporter errReporter,
     string ServiceURL,
     String ServiceNameSpace,
     MessageCredentialType MessageSecurityType,
     string certPath,
     string certPassword,
     deleSecurityCustomizer SecurityCustomizer,
     Type serviceType,
     Type InterfaceType
 )
 {
     this.errReporter      = errReporter;
     this.ServiceURL       = ServiceURL;
     this.ServiceNameSpace = ServiceNameSpace;
     this.host             = new ServiceHost(serviceType);
     this.host             = SecurityCustomizer(this.host);
     try
     {
         this.soapService = new SOAPManager
                            (
             ref host,
             SOAPServerType.winform,
             new Uri(ServiceURL),
             ServiceNameSpace,
             ServiceBindingType.WSDualHttpBinding,
             MessageSecurityType,
             certPath,
             certPassword,
             serviceType,
             InterfaceType,
             errReporter
                            );
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #17
0
 /// <summary>
 /// 윈폼 상에서 웹서비스 구축
 /// </summary>
 /// <param name="bindType">바인드 타입</param>
 /// <param name="service">웹서비스로 제공할 객체의 타입 : 싱글톤 타입 안됨</param>
 public soap_WinFormFactory(
     ref ServiceHost server,
     Uri server_url,
     string NameSpace,
     Type serviceType,
     Type ServiceInterfaceType,
     ServiceBindingType bindType,
     deleErrReporter errReporter
     )
 {
     this.server = server;
     this.bindType = bindType;
     this.service = null;
     this.serviceType = serviceType;
     this.errReporter = errReporter;
     server.Faulted += delegate
     {
         this.server.Abort();
         this.server = new ServiceHost(serviceType);
         CreateService(server_url, NameSpace, ServiceInterfaceType);
     };
     CreateService(server_url, NameSpace, ServiceInterfaceType);
     server = this.server;
 }
Example #18
0
 /// <summary>
 /// 생성과 동시에 서비스생성
 /// </summary>
 /// <param name="errReporter"></param>
 /// <param name="ServiceURL"></param>
 /// <param name="ServiceNameSpace"></param>
 internal WCFModel(deleErrReporter errReporter, string ServiceURL, String ServiceNameSpace, object serviceInstance)
 {
     this.errReporter      = errReporter;
     this.ServiceURL       = ServiceURL;
     this.ServiceNameSpace = ServiceNameSpace;
     this.host             = new ServiceHost(serviceInstance);
     try
     {
         this.soapService = new SOAPManager
                            (
             ref this.host,
             SOAPServerType.winform,
             new Uri(ServiceURL),
             ServiceNameSpace,
             ServiceBindingType.WSDualHttpBinding,
             serviceInstance,
             errReporter
                            );
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #19
0
 public SOAPManager(
     ref ServiceHost host,
     SOAPServerType soap_server,
     Uri ServiceURL,
     String NameSpace,
     ServiceBindingType bindType, 
     Type serviceType, 
     Type InterfaceType,
     deleErrReporter errReporter)
 {
     this.errReporter = errReporter;
     switch (soap_server)
     {
         case SOAPServerType.winform:
             SOAPFactory = new soap_WinFormFactory(ref host,ServiceURL,NameSpace,serviceType,InterfaceType,bindType,new deleErrReporter(ThrowErr));
             break;
         case SOAPServerType.WAS:
             break;
         case SOAPServerType.iis:
             break;
         default:
             break;
     }
 }
Example #20
0
 public static ServiceConnController getInstance(deleErrReporter errReporter)
 {
     if (instance == null)
     {
         instance = new ServiceConnController(errReporter);
     }
     return instance;
 }
Example #21
0
 public static ServiceConnController getInstance(deleErrReporter errReporter, MessageCredentialType MessageSecurityType,string certPath, string certPassword)
 {
     if (instance == null)
     {
         instance = new ServiceConnController(errReporter, MessageSecurityType,certPath,certPassword);
     }
     return instance;
 }
Example #22
0
        /// <summary>
        /// 생성과 동시에 서비스생성
        /// </summary>
        /// <param name="errReporter"></param>
        /// <param name="ServiceURL"></param>
        /// <param name="ServiceNameSpace"></param>
        internal WCFModel(deleErrReporter errReporter, string ServiceURL, String ServiceNameSpace, object serviceInstance)
        {
            this.errReporter = errReporter;
            this.ServiceURL = ServiceURL;
            this.ServiceNameSpace = ServiceNameSpace;
            this.host = new ServiceHost(serviceInstance);
            try
            {
                this.soapService = new SOAPManager
                    (
                    ref this.host,
                    SOAPServerType.winform,
                    new Uri(ServiceURL),
                    ServiceNameSpace,
                    ServiceBindingType.WSDualHttpBinding,
                    serviceInstance,
                    errReporter
                    );
            }
            catch (Exception)
            {

                throw;
            }
        }