I\'m working with a third party to integrate some of our systems with theirs and they provide us with a SOAP interface to make certain requests and changes in their connected sy
string EndPoints = "http://203.189.91.127:7777/services/spm/spm";
string New_Xml_Request_String = " " + DateTime.Now.ToString("o").Remove(19, 14) + " " + Source + " " + Destincation + " ";
protected string HttpSOAPRequest_Test(string xmlfile, string proxy)
{
try
{
System.Xml.XmlDocument doc = new System.Xml.XmlDocument();
doc.InnerXml = xmlfile.ToString();
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(EndPoints);
req.Timeout = 100000000;
if (proxy != null)
req.Proxy = new WebProxy(proxy, true);
req.Headers.Add("SOAPAction", "");
req.ContentType = "application/soap+xml;charset=\"utf-8\"";
req.Accept = "application/x-www-form-urlencoded"; //"application/soap+xml";
req.Method = "POST";
Stream stm = req.GetRequestStream();
doc.Save(stm);
stm.Close();
WebResponse resp = req.GetResponse();
stm = resp.GetResponseStream();
StreamReader r = new StreamReader(stm);
string myd = r.ReadToEnd();
return myd;
}
catch (Exception se)
{
throw new Exception("Error Occurred in AuditAdapter.getXMLDocumentFromXMLTemplate()", se);
}
}