DefaultHttpClient httpclient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet("http://192.168.1.25:82/WebService/WebService1.asmx/Login?Staff_Name=string&Staff_Password=string");
HttpResponse response1 = httpclient.execute(httpGet);
// The underlying HTTP connection is still held by the response object
// to allow the response content to be streamed directly from the network socket.
// In order to ensure correct deallocation of system resources
// the user MUST either fully consume the response content or abort request
// execution by calling HttpGet#releaseConnection().
try {
System.
out.
println(response1.
getStatusLine());
HttpEntity entity1 = response1.getEntity();
// do something useful with the response body
// and ensure it is fully consumed
String strResult
= EntityUtils.
toString(entity1
);
System.
out.
println(strResult
);
EntityUtils.consume(entity1);
} finally {
httpGet.releaseConnection();
}
//java/6862