int returnCode = con.getResponseCode();
if (returnCode != 200)
{
String rspErrorMsg = "Error getting response from the server (error code "+ returnCode + ")";
throw new AdminException(AdminException.Type.SERVER_ERROR,
rspErrorMsg);
}
else
{
in = new BufferedReader(new InputStreamReader(con
.getInputStream(), "UTF-8"));
String line;
while ((line = in.readLine()) != null) {
xmlResponse.append(line).append("\n");
}
System.out.println("xmlResponse: " + xmlResponse);
}