public void LoadCombo() { XmlDocument doc = new XmlDocument(); doc.Load("credentials.xml"); var credentials = XElement.Parse(doc.InnerXml); var serviceUrl = string.Format("{0}/{1}", credentials.Element("URL").Value, "Services"); WebInterface WEB = new WebInterface(); NAVWS navWs = new NAVWS(); var Urls = XElement.Parse(WEB.Resopnse(serviceUrl)); foreach (XElement url in Urls.Elements()) { var webserviceURL = url.Attribute("ref").Value; if (!webserviceURL.Contains("/SystemService")) { int pos = webserviceURL.LastIndexOf("/") + 1; var FileName = webserviceURL.Substring(pos, webserviceURL.Length - pos); WebServiceCombo.Items.Add(FileName); } } }
public void WebServiceUrl() { XmlDocument doc = new XmlDocument(); string serviceUrl = string.Format("{0}/{1}", GeneralURL, "Services"); XElement root = new XElement("Root", new XElement("operations")); WebInterface WEB = new WebInterface(); NAVWS navWs = new NAVWS(); var Urls = XElement.Parse(WEB.Resopnse(serviceUrl)); foreach (XElement url in Urls.Elements()) { var webserviceURL = url.Attribute("ref").Value; if (!webserviceURL.Contains("/WS/SystemService")) { int pos = webserviceURL.LastIndexOf("/") + 1; var FileName = webserviceURL.Substring(pos, webserviceURL.Length - pos); var WebService = WEB.Resopnse(webserviceURL); navWs.WebServiceReader(WebService, FileName); } } }