Beispiel #1
0
        public bool InitializeConnection()
        {
            System.Diagnostics.Debug.WriteLine("InitializeConnection _CommonPath:" + CommonPath);
            if (string.IsNullOrEmpty(CommonPath))
            {
                return(false);
            }
            var configfile = Path.Combine(CommonPath, "CommonConfig.config");

            System.Diagnostics.Debug.WriteLine("InitializeConnection configfile:" + configfile);
            XDocument xdoc = XDocument.Load(configfile);
            var       url  = from lv1 in xdoc.Descendants("add")
                             where lv1.Attribute("key").Value == ServiceUrlKey
                             select lv1.Attribute("value").Value;

            _objRemoteHelper = new CRemoteHelper(url.ElementAt(0));
            ConnectionInfo _objConnection = _objRemoteHelper.CheckConnection();

            System.Diagnostics.Debug.WriteLine("InitializeConnection _objConnection.status:" + _objConnection.status);
            if (_objConnection.status == Status.Connected)
            {
                _mObjUdtHandler     = new UDTManagerHelper(_objRemoteHelper.GetUrl("UDTManager").sEndpointAddress);
                _mObjUdtDataHandler = new UDTDataManagerHelper(_objRemoteHelper.GetUrl("UDTDataManager").sEndpointAddress);
                UDTSESSIONID        = _mObjUdtHandler.Connect();
                System.Diagnostics.Debug.WriteLine("InitializeConnection UDTSESSIONID:" + UDTSESSIONID);
                UDTDATASESSIONID = _mObjUdtDataHandler.Connect();
                System.Diagnostics.Debug.WriteLine("InitializeConnection UDTDATASESSIONID:" + UDTDATASESSIONID);
                return(true);
            }

            return(false);
        }
Beispiel #2
0
        private void InitializeWasp()
        {
            _CommonPath = Environment.GetEnvironmentVariable("Wasp3.5");

            var configfile = Path.Combine(_CommonPath, "CommonConfig.config");

            XDocument xdoc = XDocument.Load(configfile);
            var url = from lv1 in xdoc.Descendants("add")
                      where lv1.Attribute("key").Value == "LOCALMANAGERURL"
                      select lv1.Attribute("value").Value;
            _objRemoteHelper = new CRemoteHelper(url.ElementAt(0));
            ConnectionInfo info = _objRemoteHelper.CheckConnection();
            if (info.status == Status.Connected)
            {
                objWaspFileHandler = new CWaspFileHandler();
                objWaspFileHandler.Initialize(CRemoteHelper.GetDisconnectedUrl("TemplateManager"));
            }
        }
Beispiel #3
0
        private void InitializeWasp()
        {
            _CommonPath = Environment.GetEnvironmentVariable("Wasp3.5");

            var configfile = Path.Combine(_CommonPath, "CommonConfig.config");

            XDocument xdoc = XDocument.Load(configfile);
            var       url  = from lv1 in xdoc.Descendants("add")
                             where lv1.Attribute("key").Value == "LOCALMANAGERURL"
                             select lv1.Attribute("value").Value;

            _objRemoteHelper = new CRemoteHelper(url.ElementAt(0));
            ConnectionInfo info = _objRemoteHelper.CheckConnection();

            if (info.status == Status.Connected)
            {
                objWaspFileHandler = new CWaspFileHandler();
                objWaspFileHandler.Initialize(CRemoteHelper.GetDisconnectedUrl("TemplateManager"));
            }
        }
Beispiel #4
0
        public bool InitializeConnection()
        {
            System.Diagnostics.Debug.WriteLine("InitializeConnection _CommonPath:" + CommonPath);
            if (string.IsNullOrEmpty(CommonPath))
                return false;
            var configfile = Path.Combine(CommonPath, "CommonConfig.config");
            System.Diagnostics.Debug.WriteLine("InitializeConnection configfile:" + configfile);
            XDocument xdoc = XDocument.Load(configfile);
            var url = from lv1 in xdoc.Descendants("add")
                      where lv1.Attribute("key").Value == "LOCALMANAGERURL"
                      select lv1.Attribute("value").Value;
            _objRemoteHelper = new CRemoteHelper(url.ElementAt(0));
            ConnectionInfo _objConnection = _objRemoteHelper.CheckConnection();
            System.Diagnostics.Debug.WriteLine("InitializeConnection _objConnection.status:" + _objConnection.status);
            if (_objConnection.status == Status.Connected)
            {
                _mObjUdtHandler = new UDTManagerHelper(_objRemoteHelper.GetUrl("UDTManager").sEndpointAddress);
                _mObjUdtDataHandler = new UDTDataManagerHelper(_objRemoteHelper.GetUrl("UDTDataManager").sEndpointAddress);
                UDTSESSIONID = _mObjUdtHandler.Connect();
                System.Diagnostics.Debug.WriteLine("InitializeConnection UDTSESSIONID:" + UDTSESSIONID);
                UDTDATASESSIONID = _mObjUdtDataHandler.Connect();
                System.Diagnostics.Debug.WriteLine("InitializeConnection UDTDATASESSIONID:" + UDTDATASESSIONID);
                return true;
            }

            return false;
        }
Beispiel #5
0
 /// <summary>
 /// Create wasp kc connection and get template manager object
 /// </summary>
 private void InitializeWasp()
 {
     try
     {
         m_sCommonPath = Environment.GetEnvironmentVariable("Wasp3.5");
         System.Diagnostics.Debug.WriteLine("InitializeWasp Commonpath:" + m_sCommonPath);
         var configfile = Path.Combine(m_sCommonPath, "CommonConfig.config");
         System.Diagnostics.Debug.WriteLine("InitializeWasp configfile:" + configfile);
         XDocument xdoc = XDocument.Load(configfile);
         var url = from lv1 in xdoc.Descendants("add")
                   where lv1.Attribute("key").Value == "LOCALMANAGERURL"
                   select lv1.Attribute("value").Value;
         System.Diagnostics.Debug.WriteLine("InitializeWasp Url:" + url.ElementAt(0));
         m_objRemoteHelper = new CRemoteHelper(url.ElementAt(0));
         ConnectionInfo info = m_objRemoteHelper.CheckConnection();
         if (info.status == Status.Connected)
         {
             ServiceUrl templatemgrserviceurl = CRemoteHelper.GetDisconnectedUrl("TemplateManager");
             m_objWaspFileHandler = new CWaspFileHandler();
             m_objWaspFileHandler.Initialize(templatemgrserviceurl);
             LoadTemplates();
         }
     }
     catch (Exception ex)
     {
         LogWriter.WriteLog(ex);
     }
 }