public float getAccountBalance() { //log.debug("in getAccountBalance");
PostMethod method = new PostMethod(smsServiceUrl);
method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(3, false));
method.setParameter("Username", username);
method.setParameter("PIN", PIN);
method.setParameter("AvailableCredit", "");
String result = new String();
try {
result = doHttpServiceRequest(method);
// log.debug("result is: " + result);
} catch (Exception e) {
// log.warn(e.toString());
}
String[] retArray = result.split(" ");
return Float.valueOf(retArray[1]);
}
Here i am getting ArrayIndexOutBoundException. can any one tell me how to rectify that exception?