I tried to call a get-balance web/ RESTful API of Nexmo.com to get account's balance, but I received two kind of error response: (1)400 - page not found in GAE-Java runtme. (2)FileNotFoundException in Java SE runtime. How to get the correct XML page by Java BufferedReader?
String api = "http://rest.nexmo.com/account/get-balance/{idkey}/{pwkey}";
URL url = new URL(api);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));
while ((line = reader.readLine()) != null) {
...