I have the SOAP request in an XML file. I want to post the request to the web service in .net How to implement?
var uri = new Uri("http://localhost/SOAP/SOAPSMS.asmx/add");
var req = (HttpWebRequest) WebRequest.CreateDefault(uri);
req.ContentType = "text/xml; charset=utf-8";
req.Method = "POST";
req.Accept = "text/xml";
req.Headers.Add("SOAPAction", "http://localhost/SOAP/SOAPSMS.asmx/add");
var strSoapMessage = @"
235
";
using (var stream = new StreamWriter(req.GetRequestStream(), Encoding.UTF8))
stream.Write(strSoapMessage);