public bool loginGetSession(string url)
        {
            try
            {
                //Setup identity and login to GIS. This is followed by tagging on the sid to the GIS URL. 
                string url_sid = "";
                port = new SessionServiceService();
                port.Url = "http://" + url + "/gis/services/SessionService";
                Identity id = new Identity();
                id.credentials = "[i]hiding this[/i]";
                id.principal = "board.wall";
                id.tenant = "Resources";
                sid = port.login(id);
                url_sid = "http://" + url + "/gis/services/SessionService" + "?GISsessionId=" + sid;
                port.Url = url_sid;
                Console.WriteLine("Logged in with session " + url_sid);
                return true;
             }
             catch (Exception ex)
             {
                 Console.WriteLine(ex.Message);
                 return false;
             }
Also in this method
        public bool subscribeToStat(string objectName, string statName, string statCounter)
        {
            try
            {
                 //We should be logged in now.   Next,  subscribe services. 
                statistic stat = new statistic();
                stat.statisticId = "Stat_num_" + statCounter.ToString();
                objectIdType objectId = new objectIdType();
                objectId.id = objectName;
                objectId.tenantName = "Resources";
                stat.objectId = objectId;
                Console.WriteLine("Statistic needed for: " + stat.statisticId);
                metric metric = new metric();
                statisticType type = new statisticType();
                objectType[] ot = new objectType[] { objectType.GroupQueues };
                type.objectType = ot;
                metric.statisticType = type;
                metric.typeName = statName;
                timeInterval timeInterval = new timeInterval();
                timeInterval.intervalType = timeIntervalType.GrowingWindow;
                metric.interval = timeInterval;
                stat.metric = metric;
                
                schedule sched = new schedule();
                sched.notificationMode = scheduleMode.ChangesBased;
                stat.schedule = sched;
                // StatServiceService statService = new StatServiceService();
                statService.subscribeStatistic(stat, "ECSSPROD_Stat_Server_CCPulse1", new 
                    unsolicitedNotification());
                Console.WriteLine("subscribe successful");
                return true;
             }
            catch (Exception ex)
            {
                Console.WriteLine("subscribeToStat: " + ex.Message);
                return false;
            }
        }
Thanks,