//Use get logedIn user Information public ServiceResponse getUserInforamtion(log4net.ILog LOG) { string URL = (new ServiceStatistics().GetUserGeneralInforamtionUrl(ApplicationStatics.GetUserNamenClientCode(ApplicationStatics.UserName, ApplicationStatics.ClientCode))); return(callServiceByURL(URL, LOG)); }
public ServiceResponse callServiceByURL(string URL) { ServiceResponse _serviceResponse = null; try { //LOG.InfoFormat("IPAddress : {0}, Service Call URL : {1} .", ApplicationStatics.ClientIPAddress, URL); _serviceResponse = (new HttpCaller()).ExecuteGetHttpWebRequest( ApplicationStatics.GetUserNamenClientCode(ApplicationStatics.UserName, ApplicationStatics.ClientCode), ApplicationStatics.SecretKey, URL, ""); } catch (Exception e) { // TODO Auto-generated catch block _serviceResponse = new ServiceResponse() { ResponseCode = -4, Content = e.Message, Exception = e.StackTrace }; } /******************************************** * Exception Code and Description * Exception Code = -1, NoSuchAlgorithmException * Exception Code = -2, ClientProtocolException * Exception Code = -3, IOException * Exception Code = -4, Exception on ServiceCaller Class * Exception Code = -5, Exception on ActivityCall *********************************************/ //LOG.InfoFormat("IPAddress : {0}, Service Call Response : ResponseCode : {1}, \n ResponseContent : {2}, \n ResponseExpection : {3}", //ApplicationStatics.ClientIPAddress, serviceResponse.ResponseCode, serviceResponse.Content, _serviceResponse.Exception); return(_serviceResponse); }