How to make request to web service with soap message - asp.net /C#
If you have web services and want to call the web service from your c# code, you can try to use this code example. The code example uses HttpWebRequest to create a request for the web service. Code Behind HttpWebRequest request = (HttpWebRequest)WebRequest.Create(<web service address>); request.Headers.Add("SOAPAction", "http://tempuri.org/" + <web service method>); request.ContentType = "text/xml;charset=\"utf-8\""; request.KeepAlive = false; request.Timeout = 300000; // - in millisecond. (5 minit) request.Method = "POST"; request.Credentials = CredentialCache.DefaultCredentials; byte[] byteArray = Encoding.ASCII.GetBytes(<data you want to send to webservice>); request.ContentLength = byteArray.Length; Stream s = request.GetRequestStream(); s.Write(byteArray, 0, byteArray.Length); s.Dispose(); ...