string SOAPRequest="",SOAPInput=""; XmlDocument doc = new XmlDocument(); SOAPRequest = "<?xml version='1.0' encoding='utf-8'?>"; SOAPRequest += "<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope'>"; SOAPRequest += "<soap:Body>"; SOAPRequest += "<GetCustomerInfoXML xmlns='http://qa2.alliancetek.com/phpwebservice'>"; SOAPRequest += "<id><customer><id>1</id></customer></id></GetCustomerInfoXML></soap:Body>"; SOAPRequest += "</soap:Envelope>"; doc.InnerXml = @""+SOAPRequest; HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://qa2.alliancetek.com/phpwebservice/index.php"); if (proxy != null) { req.Proxy = new WebProxy(proxy, true); } req.Headers.Add("SOAPAction", "http://qa2.alliancetek.com/phpwebservice/index.php/GetCustomerInfoXML"); req.ContentType = "text/xml;charset=\"utf-8\""; req.Accept = "text/xml"; req.Method = "POST"; //req.ContentLength = 1000; Stream stm = req.GetRequestStream(); doc.Save(stm); stm.Close(); //Stream stm; WebResponse resp = req.GetResponse(); stm = resp.GetResponseStream(); StreamReader r = new StreamReader(stm); //Response.Write(r.ReadToEnd()); string sResponse = r.ReadToEnd();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)