Пример #1
0
        public bool GetIntegrationServicePingResult(string intsvc)
        {
            bool tmpReturn = false;

            // instantiate pinger object
            InfaWSHDataIntegration.PingDIServerRequest pingReq
                = new InfaWSHDataIntegration.PingDIServerRequest();

            // set timeout
            pingReq.TimeOut = (PING_TIME_OUT);

            // provide DI WSH Service connection info.
            // We should already be logged but now provide domain and service name info
            InfaWSHDataIntegration.DIServiceInfo diInfo = new InfaWSHDataIntegration.DIServiceInfo();
            diInfo.DomainName  = DI_DOMAIN_NAME;
            diInfo.ServiceName = intsvc;

            pingReq.DIServiceInfo = diInfo;

            // Conduct the actual ping based on the pingRequest using the WSDL Proxy Object
            InfaWSHDataIntegration.EPingState pingResult = DIWSProxy.pingDIServer(pingReq);

            // determine if ping provided success or not
            if (pingResult == InfaWSHDataIntegration.EPingState.ALIVE)
            {
                tmpReturn = true;
            }


            return(tmpReturn);
        }
Пример #2
0
        public string[] GetIntegrationServiceProperties(string intsvc)
        {
            string[] tmpReturn = new string[6];

            InfaWSHDataIntegration.DIServiceInfo diInfo
                = new InfaWSHDataIntegration.DIServiceInfo();
            diInfo.DomainName  = DI_DOMAIN_NAME;
            diInfo.ServiceName = intsvc;

            InfaWSHDataIntegration.DIServerProperties serverProp
                = DIWSProxy.getDIServerProperties(diInfo);

            tmpReturn[0] = intsvc;
            tmpReturn[1] = serverProp.DIServerName;
            tmpReturn[2] = serverProp.DIServerVersion;
            tmpReturn[3] = serverProp.ProductName;
            tmpReturn[4] = serverProp.DIServerMode.Value.ToString();
            tmpReturn[5] = serverProp.CanInfaServerDebugMapping.ToString();
            tmpReturn[6] = serverProp.CurrentTime.ToString();

            #region Detail to what the server properties mean

            //Console.WriteLine("[Output] : DI Server properties are as follows...");
            //Console.WriteLine("[Output] : DI Server name : " + serverProp.DIServerName);
            //Console.WriteLine("[Output] : DI Server version : " + serverProp.DIServerVersion);
            //Console.WriteLine("[Output] : DI Server product name : " + serverProp.ProductName);
            //Console.WriteLine("[Output] : DI Server mode : " + serverProp.DIServerMode);
            //Console.WriteLine("[Output] : Can DI Server debug mapping : " + serverProp.CanInfaServerDebugMapping);
            //Console.WriteLine("[Output] : DI Server time");
            //InfaWSHDataIntegration.DIServerDate date = serverProp.CurrentTime;
            //Console.WriteLine("[Output] : date : " + date.Date);
            //Console.WriteLine("[Output] : hours : " + date.Hours);
            //Console.WriteLine("[Output] : minutes : " + date.Minutes);
            //Console.WriteLine("[Output] : month : " + date.Month);
            //Console.WriteLine("[Output] : nano seconds : " + date.NanoSeconds);
            //Console.WriteLine("[Output] : seconds : " + date.Seconds);
            //Console.WriteLine("[Output] : UTC time : " + date.UTCTime);
            //Console.WriteLine("[Output] : year : " + date.Year);
            #endregion

            return(tmpReturn);
        }