我需要先使用下面的调用。我会得到
WebRequest request = WebRequest.Create("https://cli-cert.emdeon.com/servlet/DxLogin?userid={userid}&PW={password}0&hdnBusiness={facilityid}&target=jsp/lab/results/FDC.jsp&apiLogin=true&apiuserid={userid}&actionCommand=startDownload&autoPrint=true&batchDownload=true&reportTypes=LABRES&CreationDateFrom=02/01/2013&CreationDateTo=04/24/2013");
WebResponse resp = request.GetResponse();
Stream responseStream = resp.GetResponseStream();
StreamReader responseReader = new StreamReader(responseStream);
string responseString = responseReader.ReadToEnd();
WebRequest request1 = WebRequest.Create("https://cli-cert.emdeon.com/servlet/lab.results.fdcServlet?actionCommand=NextFile&batchDownload=true&fdcuserid={userid}");
WebResponse resp1 = request.GetResponse();
Stream responseStream1 = resp.GetResponseStream();
StreamReader responseReader1 = new StreamReader(responseStream1);
string responseString1 = responseReader1.ReadToEnd();
WebRequest request2 = WebRequest.Create("https://cli-cert.emdeon.com/servlet/lab.results.fdcServlet?actionCommand=GetFileInfo&fdcuserid={userid}");
WebResponse resp2 = request.GetResponse();
Stream responseStream2 = resp.GetResponseStream();
StreamReader responseReader2 = new StreamReader(responseStream2);
string responseString2 = responseReader2.ReadToEnd();
WebRequest request3 = WebRequest.Create("https://cli-cert.emdeon.com/servlet/lab.results.fdcServlet?actionCommand=DownloadFile&mmi=true&fdcuserid={userid}");
WebResponse resp3 = request.GetResponse();
Stream responseStream3 = resp3.GetResponseStream();
StreamReader responseReader3 = new StreamReader(responseStream3);
string responseString3 = responseReader3.ReadToEnd();
WebRequest request4 = WebRequest.Create("https://cli-cert.emdeon.com/servlet/lab.results.fdcServlet?actionCommand=MarkAsDownloaded&fdcuserid={userid}");
WebResponse resp4 = request.GetResponse();
Stream responseStream4 = resp4.GetResponseStream();
StreamReader responseReader4 = new StreamReader(responseStream3);
string responseString4 = responseReader4.ReadToEnd();
resp.Close();
resp1.Close();
resp2.Close();
resp3.Close();
resp4.Close();
注意:{userid}、{password}、{facilityId} 是登录凭据。
I need to call all the 5 request and parse it and save. I need to call each calls by listed order only.
1)第一次打电话我得到了预期的输出。2) 预期调用是“<--BEGIN NUMBER OF DOCS>2;warning;123345;asdf;sdf;234243;18872_TEST_TC3;<--END NUMBER OF DOCS>”但我的流阅读器变空了。
3)所有其他电话都变空了
欢迎任何阅读建议和解决方案。我是开发和 c# 的新手。提前致谢。
谢谢 Rajesh.k