Esempio n. 1
0
        public static TmriResponse WriteDrvBaseTmriRequest(DrvBaseTmriRequest request)
        {
            log.Debug("预约写入接口的xtlb:" + request.GetXtlb());
            log.Debug("预约写入接口的jkxlh:" + request.GetJkxlh());
            log.Debug("预约写入接口的jkid:" + request.GetJkid());
            log.Debug("预约写入接口的文本为:" + request.ToXml());
            // TestLog.LogStep();
            TestLog.Log("预约写入接口的文本为:" + request.ToXml());

            string responseText = "";

            try
            {
                responseText = GetNewService().writeObjectOut(request.GetXtlb(), request.GetJkxlh(), request.GetJkid(), request.ToXml());
            }
            catch (Exception exe)
            {
                TestLog.Log("预约写入接口的返回为:" + exe.ToString());
                log.Info(exe);

                return(new TmriResponse());
            }
            log.Debug("调用写入接口" + request.GetXtlb() + ";" + request.GetJkxlh() + ";" + request.GetJkid() + ";" + request.ToXml() + "返回的文本为:" + responseText);
            TestLog.Log("调用写入接口" + request.GetXtlb() + ";" + request.GetJkxlh() + ";" + request.GetJkid() + ";" + request.ToXml() + "返回的文本为:" + responseText);
            TmriResponse response = new TmriResponse();

            response.ParseFromXml(responseText);
            log.Debug("返回的结果code为:" + response.Code);
            //TestLog.Log("返回的结果code为:" + response.Code);
            return(response);
        }
Esempio n. 2
0
        public static TmriResponse WriteDrvBaseTmriRequest(DrvBaseTmriRequest request)
        {
            log.Debug("预约写入接口的xtlb:" + request.GetXtlb());
            log.Debug("预约写入接口的jkxlh:" + request.GetJkxlh());
            log.Debug("预约写入接口的jkid:" + request.GetJkid());
            log.Debug("预约写入接口的文本为:" + request.ToXml());
               // TestLog.LogStep();
            TestLog.Log("预约写入接口的文本为:" + request.ToXml());

            string responseText = "";
            try
            {
                responseText = GetNewService().writeObjectOut(request.GetXtlb(), request.GetJkxlh(), request.GetJkid(), request.ToXml());
            }
            catch (Exception exe)
            {
                TestLog.Log("预约写入接口的返回为:" + exe.ToString());
                log.Info(exe);

                return new TmriResponse();
            }
            log.Debug("调用写入接口" + request.GetXtlb() + ";" + request.GetJkxlh() + ";" + request.GetJkid() + ";" + request.ToXml() + "返回的文本为:" + responseText);
            TestLog.Log("调用写入接口" + request.GetXtlb() + ";" + request.GetJkxlh() + ";" + request.GetJkid() + ";" + request.ToXml() + "返回的文本为:" + responseText);
            TmriResponse response = new TmriResponse();
            response.ParseFromXml(responseText);
            log.Debug("返回的结果code为:"+response.Code);
            //TestLog.Log("返回的结果code为:" + response.Code);
            return response;
        }