public XmlDocument GetXML(string[] arrInputInfo) { string rtnErrno=null; ArrayList rtnValidateLogin=null; string rtnPostSMS = null; string strStartDateTime = DateTime.Now.ToString(); string strEndDateTime = DateTime.Now.ToString(); DataSet dst=new DataSet(); string[] arrLogReq = new string[5]; string strLoginRef = "-999"; string strstatus = "20"; try { //Validate Input Details rtnErrno = ValidateInputInfo(arrInputInfo); if (rtnErrno != "0") { throw new Exception("Exception raised at Input Validation"); } //Validate Login Details rtnValidateLogin = objLogin.ValidateCPLogin(arrInputInfo[0], arrInputInfo[1]); if (rtnValidateLogin[0].ToString() != "0") { rtnErrno = rtnValidateLogin[0].ToString(); throw new Exception("Exception raised at Login Validation"); } else { dst = (DataSet)rtnValidateLogin[1]; strLoginRef = dst.Tables[0].Rows[0][0].ToString(); } //Insert Message rtnPostSMS = PostSMSText(arrInputInfo); if (rtnPostSMS.ToString() != "0") { rtnErrno = rtnPostSMS[0].ToString(); throw new Exception("Exception raised at Inserting Message"); } } catch (Exception ex) { strstatus = "30"; LogErrorHelper.LogError(Constants.ERROR_WEBSERVICES_LOGFILE, ex, "BLL.CSMSService-->GetXML"); } finally { GC.Collect(); } try { strEndDateTime = DateTime.Now.ToString(); arrLogReq[0] = strLoginRef; //Login Ref no arrLogReq[1] = string.Concat(arrInputInfo[2], "~", arrInputInfo[3]); //Mobile No and Message arrLogReq[2] = strStartDateTime; //start time arrLogReq[3] = strEndDateTime; //end time arrLogReq[4] = strstatus; //To Log Incoming Requests rtnErrno = LogConfirmation(arrLogReq); } catch (Exception ex) { LogErrorHelper.LogError(Constants.ERROR_WEBSERVICES_LOGFILE, ex, "BLL.CSMSService-->GetXML"); } finally { GC.Collect(); } return GetFinalXml(rtnErrno); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)