logger.debug("AuthorisationHeader="+authorisationHeader);
Locate me=new Locate(serviceEndpoints, authorisationHeader);
LocationResponse singleResponse=me.locateTerminal("tel:123456", 1000);
logger.debug("Locate single terminal");
if (singleResponse!=null) {
logger.debug("Have JSON response:\n"+singleResponse.toString());
if (singleResponse.getTerminalLocationList()!=null && singleResponse.getTerminalLocationList().getTerminalLocation()!=null) {
for (TerminalLocation t:singleResponse.getTerminalLocationList().getTerminalLocation())
logger.debug("Location Response="+t.toString());
}
} else {
logger.debug("No response obtained");
}
logger.debug("Make erroneous request");
LocationResponse errorCase=me.locateTerminal(null, 1000);
if (errorCase!=null) {
logger.debug("Have JSON response:\n"+errorCase.toString());
if (errorCase.getTerminalLocationList()!=null && errorCase.getTerminalLocationList().getTerminalLocation()!=null) {
for (TerminalLocation t:errorCase.getTerminalLocationList().getTerminalLocation())
logger.debug("Location Response="+t.toString());
}
} else {
logger.debug("No response obtained");
}
logger.debug("Locate multiple terminals");
String[] multipleAddresses={"tel:123456", "tel:987654", "tel:2468", "tel:13579"};
LocationResponse multipleCase=me.locateMultipleTerminals(multipleAddresses, 50);
if (multipleCase!=null) {
logger.debug("Have JSON response:\n"+multipleCase.toString());
if (multipleCase.getTerminalLocationList()!=null && multipleCase.getTerminalLocationList().getTerminalLocation()!=null) {
for (TerminalLocation t:multipleCase.getTerminalLocationList().getTerminalLocation())
logger.debug("Location Response="+t.toString());
}
} else {
logger.debug("No response obtained");
}