在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
数据格式: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:queryServiceResponse xmlns:ns2="http://impl.ws.remote.dataservice.apps.ut.comsys.net.cn/"> <return> { "data": { "dwsjxx": [{ "SFCX": "0", "SFST": "02444", "DWH": "2100", "LSDWH": "30000", "DWMC": "办公室", "DWJBSJZLB_ID": 0 }, { "SFCX": "0", "SFST": "02444", "DWH": "2100", "LSDWH": "30000", "DWMC": "办公室1", "DWJBSJZLB_ID": 1 }] }, "success": true } </return> </ns2:queryServiceResponse> </soap:Body> </soap:Envelope> 解析代码,得到return里面的数据: string Url = "http://############"; X.Component.Tools.WebClient wc = new Component.Tools.WebClient(); wc.Encoding = System.Text.Encoding.UTF8; var result = wc.GetHtml(Url); XmlDocument doc = new XmlDocument(); doc.LoadXml(result); XmlElement root = doc.DocumentElement; XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable); nsmgr.AddNamespace("soap", "http://schemas.xmlsoap.org/soap/envelope/"); string value = doc.SelectSingleNode("//soap:Envelope", nsmgr).InnerText; X.Api.Department DepInfo = new X.Api.Department(); JsonConvert.DeserializeObject<X.Api.Department>(value); //得到json数据
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论