Code:
string sURL;
sURL = "URLWebServicea";
WebRequest wrGETURL;
wrGETURL = WebRequest.Create(sURL);
WebProxy myProxy = new WebProxy("myproxy",80);
myProxy.BypassProxyOnLocal = true;
wrGETURL.Proxy = WebProxy.GetDefaultProxy();
Stream objStream;
objStream = wrGETURL.GetResponse().GetResponseStream();
StreamReader objReader = new StreamReader(objStream);
string sLine = "";
int i = 0;
while (sLine!=null)
{
i++;
sLine = objReader.ReadLine();
if (sLine!=null)
Console.WriteLine("{0}:{1}",i,sLine);
}
Console.ReadLine();
string sURL;
sURL = "URLWebServicea";
WebRequest wrGETURL;
wrGETURL = WebRequest.Create(sURL);
WebProxy myProxy = new WebProxy("myproxy",80);
myProxy.BypassProxyOnLocal = true;
wrGETURL.Proxy = WebProxy.GetDefaultProxy();
Stream objStream;
objStream = wrGETURL.GetResponse().GetResponseStream();
StreamReader objReader = new StreamReader(objStream);
string sLine = "";
int i = 0;
while (sLine!=null)
{
i++;
sLine = objReader.ReadLine();
if (sLine!=null)
Console.WriteLine("{0}:{1}",i,sLine);
}
Console.ReadLine();
Kad pokrenem konzolnu aplikaciju, dobijem izlaz na ekranu (na crnoj pozadini) ispisan xml file. Kako da taj tok skrenem u fajl.xml koji cu da smestim na disku kako bih ga kasnije obradjivao?
hvala gorann
[Shadowed: dodati [code] tagovi]
[Ovu poruku je menjao Shadowed dana 22.10.2005. u 19:40 GMT+1]
gnastic