Need help in capturing live xml data stream

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi;
I am trying to (debug an ASP.net web handler) capture a live data feed from a remote server,


<span style="font-size:small; color:#008000 <span style="font-size:small; color:#008000 <span style="font-size:small; color:#008000 <span style="font-size:small; color:#008000 <span style="font-size:small; color:#008000 <span style="font-size:small; color:#008000 <span style="font-size:small; color:#008000 <span style="font-size:small; color:#008000 <span style="font-size:small; color:#008000 <span style="font-size:small <span style="font-size:small req.ContentType
= <span style="font-size:small; color:#a31515 <span style="font-size:small; color:#a31515 <span style="font-size:small; color:#a31515 "text/xml"<span style="font-size:small <span style="font-size:small ;

and I am not sure if I am using the correct method for this.
I can can run this code fine through a static xml file.
Here is my code:
WebRequest req = null;
WebResponse res = null;
string uri = " https://myvendorssite.com/ https://myVendorsSite.com "

req = webrequest.create(uri);
<span style="font-size:small <span style="font-size:small
req.Method =
<span style="font-size:small; color:#a31515 <span style="font-size:small; color:#a31515 <span style="font-size:small; color:#a31515 "POST"<span style="font-size:small <span style="font-size:small ;
<span style="font-size:small; color:#2b91af <span style="font-size:small; color:#2b91af <span style="font-size:small; color:#2b91af
StreamWriter
<span style="font-size:small <span style="font-size:small writer =
<span style="font-size:small; color:#0000ff <span style="font-size:small; color:#0000ff <span style="font-size:small; color:#0000ff new<span style="font-size:small <span style="font-size:small
<span style="font-size:small; color:#2b91af <span style="font-size:small; color:#2b91af <span style="font-size:small; color:#2b91af StreamWriter<span style="font-size:small <span style="font-size:small (req.GetRequestStream());<a> <span style="font-size:small <span style="font-size:small <span style="font-size:small <span style="font-size:small

<span style="color:#008000; font-size:small <span style="color:#008000; font-size:small <span style="color:#008000; font-size:small
//StreamReader reader = new StreamReader(Server.MapPath("~/20121129-0121-1.xml")); Works with static file
Will the following work to read the incoming data feed ?????
<span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small
StreamReader
<a> <a> <a> <a> <a> <a> <a> <a> <span style="font-size:small <span style="font-size:small reader =
<span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small <span style="color:#0000ff; font-size:small new<span style="font-size:small <span style="font-size:small
<span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small <span style="color:#2b91af; font-size:small StreamReader<span style="font-size:small <span style="font-size:small (req.GetRequestStream());<a> <a> <a> <span style="font-size:small <span style="font-size:small <span style="font-size:small <span style="font-size:small
<
GeeMann
<br/>


View the full article
 
Back
Top