Geeks With Blogs
Gaurav Taneja Great dreams... never even get out of the box. It takes an uncommon amount of guts to put your dreams on the line, to hold them up and say, "How good or how bad am I?" That's where courage comes in.

this.EnableViewState = false;

HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.UTF8;

HttpContext.Current.Response.ContentType = "text/XML";


HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://yourewebsercvice.asmx?wsdl");  // change the url

request.Credentials=new NetworkCredential("sample name","password","domain");

HttpWebResponse response = (HttpWebResponse)request.GetResponse ();

Stream receiveStream =response.GetResponseStream();

StreamReader readStream = new StreamReader (receiveStream, Encoding.UTF8);

string result=readStream.ReadToEnd ();


HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=" + "fileName.xml");

Posted on Monday, January 29, 2007 8:01 AM | Back to top

Comments on this post: Downloading webservice with wsdl

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Gaurav Taneja | Powered by: