string xmlResultAsString = null;
// Construct the URL
string UrlFormat = "http://138.4.40.11:8080/damehuella/getHuella{0}";
string url = string.Format(UrlFormat, "?mac="+macad+"&132b="+huellap[0]+"&133b="+huellap[1]+"&136b="+huellap[2]+"&1320b="+huellap[3]);
// Create and issue the HTTP request
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse response = request.GetResponse();
// Retrieve the XML data as string
// If you don't care about the XML that is returned
// by the Tomcat server, then you can ignore this bit
if (response.StatusCode == HttpStatusCode.OK)
{
using (StringReader reader = new StringReader(response.GetResponseStream()))
{
xmlResultAsString = reader.ReadToEnd();
}
}
// Now you can do whatever you need to do with the XML
// e.g. load it into a DOM object
Neil Cowburn
Principal Partner
OpenNETCF Consulting, LLC
This posting is provided "AS IS" with no warranties, and confers no rights.