我正在使用 .net webservice 来捕获我从 Android 应用程序获得的响应。我从 android 应用程序返回以下行
HttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost(
"http://10.0.2.2:51889/OMS/WebServices/Service.asmx/Test");
List<NameValuePair> nameValuePair = new ArrayList<NameValuePair>(2);
nameValuePair.add(new BasicNameValuePair("email", "abc"));
nameValuePair.add(new BasicNameValuePair("pwd", "123"));
// Url Encoding the POST parameters
try {
httpPost.setEntity(new UrlEncodedFormEntity(nameValuePair));
} catch (UnsupportedEncodingException e) {
// writing error to Log
e.printStackTrace();
}
// Making HTTP Request
try {
HttpResponse response = httpClient.execute(httpPost);
} catch (ClientProtocolException e) {
// writing exception to log
e.printStackTrace();
} catch (IOException e) {
// writing exception to log
e.printStackTrace();
}
我怎样才能在.net web 服务中得到这个响应?
我从android得到这样的数据
那么我怎样才能在 C#.net 中获取这些数据???