public string getXmlStr(string hphmcode)
{
string Url = "http://localhost:8080/readvioinfo.jsp";
string hphm = hphmcode;
string hpzl = "02";
//Encoding encoding = Encoding.GetEncoding("utf-8");
Encoding encoding = Encoding.GetEncoding("GB2312");
string postData = "hphm=" + hphm + "&hpzl=" + hpzl;
byte[] data = encoding.GetBytes(postData);
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
//发送数据
request.Method = "POST";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = data.Length;
Stream requestStream = request.GetRequestStream();
requestStream.Write(data, 0, data.Length);
requestStream.Close();
//接收返回值
HttpWebResponse res = (HttpWebResponse)request.GetResponse();
StreamReader sReader = new StreamReader(res.GetResponseStream(), System.Text.Encoding.UTF8);
string strBack = sReader.ReadToEnd();
//Response.Write(strBack);
sReader.Close();
res.Close();
return strBack;
}