* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse
* response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
TokenValidated tokenValidated;
Proxy proxy;
String valor = "var exception = '%s';";
try {
// trata chamada
proxy = new Proxy(request);
// autentica usuário
tokenValidated = Common.ValidateUser(proxy);
// Qual serviço
if (proxy.TypeCall == Proxy.ServiceRequest) {
switch (proxy.GetWebservice()) {
case Webservices.AddressFinder:
valor = ControlAddressFinder.runService(proxy, tokenValidated);
break;
case Webservices.MapRender:
valor = ControlMapRender.runService(proxy, tokenValidated);
break;
case Webservices.Route:
valor = ControlRoute.runService(proxy, tokenValidated);
break;
case Webservices.Proximity:
valor = ControlProximity.runService(proxy, tokenValidated);
break;
}
valor = "AjaxCrossCall.remoteloader.callback('" + valor.replace('\'', '`') + "','" + proxy.GetCallback() + "')";
} else
valor = String.format(valor, "No Action");
} catch (Exception ex) {
valor = String.format(valor, ex.getMessage());