public static string InformationExchange(MessageToWebService messageToWebService)
        {
            //进行升级的验证操作

            FeedBackFromWebService feedBack = new FeedBackFromWebService();

            feedBack.AllowUpdate       = "allow";
            feedBack.FtpPwd            = "";
            feedBack.FtpUser           = "";
            feedBack.UpdateFileMd5     = "";
            feedBack.UpdateFileName    = "";
            feedBack.UpdatePubDate     = DateTime.Now;
            feedBack.UpdateSoftVersion = "";
            return(Newtonsoft.Json.JsonConvert.SerializeObject(feedBack));//返回json格式的数据
        }
示例#2
0
        public string InfoExchangeAPI(string strMessageToWeService)
        {
            Log.WriteLog(strMessageToWeService);
            MessageToWebService messageToWebService = new MessageToWebService();
            string result = string.Empty;

            try
            {
                messageToWebService = Newtonsoft.Json.JsonConvert.DeserializeObject <MessageToWebService>(strMessageToWeService);
                result = FileOpteration.InformationExchange(messageToWebService);
                Log.WriteLog(result);
            }
            catch (Exception)
            {
                //throw;
                //return "";
            }
            return(result);
        }