Пример #1
0
Файл: PK.cs Проект: aj-hc/SZY
 /// <summary>
 /// 获取数据
 /// </summary>
 /// <param name="request"></param>
 /// <returns></returns>
 public string GetHTTPWebServiceDataold(string request)
 {
     string strmethod = System.Configuration.ConfigurationManager.AppSettings["Pmethod"];
     //修改为读取HTTP请求WEBSERVICE
     //string xm = PostData(request, strmethod);//通过HTTP请求获取
     //GetQueryPT.ChasCommonPTClient pt = new GetQueryPT.ChasCommonPTClient();//通过服务引用 一般不能用
     //string add= pt.queryPatient(request);
     PTtest.ChasCommonSvc ppt = new PTtest.ChasCommonSvc();//通过WEB服务获取
     string xm = ppt.queryPatient(request);
     ////本地读取XML
     //XmlDocument xml = RuRo.Common.XmlHelper.XMLLoad("XML//queryPatientResp.xml");
     //XmlDocument xml = new XmlDocument();
     //xml.LoadXml(xm);
     //XmlNamespaceManager nsmgr = new XmlNamespaceManager(xml.NameTable);
     //nsmgr.AddNamespace("ab", "http://chas.hit.com/transport/integration/common/msg");
     //XmlNodeList respHeaderlist = xml.SelectNodes("//ab:respHeader", nsmgr);
     //if (respHeaderlist.Count > 0 && respHeaderlist[0].InnerText.Contains("000000"))
     //{
     //    XmlNodeList patientlist = xml.SelectNodes("//ab:patient", nsmgr);
     //    if (patientlist.Count>0)
     //    {
     //        foreach (var item in patientlist)
     //        {
     //            XmlElement xe = (XmlElement)item;
     //            XmlDocument doc = new XmlDocument();
     //        }
     //    }
     //}
     return xm;
     //XmlNodeList rootNode = xm.GetElementsByTagName("QueryPatientResponse", "http://chas.hit.com/transport/integration/common/msg");
 }
Пример #2
0
        /// <summary>
        /// 获取数据
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        public string GetHTTPWebServiceData(string request)
        {
            string strmethod = System.Configuration.ConfigurationManager.AppSettings["Pmethod"];

            //修改为读取HTTP请求WEBSERVICE
            //string xm = PostData(request, strmethod);//通过HTTP请求获取
            //GetQueryPT.ChasCommonPTClient pt = new GetQueryPT.ChasCommonPTClient();//通过服务引用 一般不能用
            //string add= pt.queryPatient(request);
            PTtest.ChasCommonSvc ppt = new PTtest.ChasCommonSvc();//通过WEB服务获取
            string xm = ppt.queryPatient(request);

            ////本地读取XML
            //XmlDocument xml = RuRo.Common.XmlHelper.XMLLoad("XML//queryPatientResp.xml");
            //XmlDocument xml = new XmlDocument();
            //xml.LoadXml(xm);
            //XmlNamespaceManager nsmgr = new XmlNamespaceManager(xml.NameTable);
            //nsmgr.AddNamespace("ab", "http://chas.hit.com/transport/integration/common/msg");
            //XmlNodeList respHeaderlist = xml.SelectNodes("//ab:respHeader", nsmgr);
            //if (respHeaderlist.Count > 0 && respHeaderlist[0].InnerText.Contains("000000"))
            //{
            //    XmlNodeList patientlist = xml.SelectNodes("//ab:patient", nsmgr);
            //    if (patientlist.Count>0)
            //    {
            //        foreach (var item in patientlist)
            //        {
            //            XmlElement xe = (XmlElement)item;
            //            XmlDocument doc = new XmlDocument();
            //        }
            //    }
            //}
            return(xm);
            //XmlNodeList rootNode = xm.GetElementsByTagName("QueryPatientResponse", "http://chas.hit.com/transport/integration/common/msg");
        }