Object[] o;
ProximityInfo pInfo;
ConfigurationManager cm = ConfigurationManager.getInstance();
CProximity cProximity = new CProximity(cm.getAppSettings("Maquina"), "");
switch (getService(proxy.GetService()))
{
case findClosestFromAddress:
o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { Address.class, ProximityOptions.class });
pInfo = cProximity.findClosestFromAddress((Address)o[0], (ProximityOptions)o[1], tk.getId());
respostaWs = Common.SerializeJSObject(pInfo);
break;
case findClosestFromXY:
o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { Point.class, ProximityOptions.class });
pInfo = cProximity.findClosestFromXY((Point)o[0], (ProximityOptions)o[1], tk.getId());
respostaWs = Common.SerializeJSObject(pInfo);
break;
case findRadiusFromAddress:
o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { Address.class, Integer.class, ProximityOptions.class });
pInfo = cProximity.findRadiusFromAddress((Address)o[0], (Integer)o[1], (ProximityOptions)o[2], tk.getId());
respostaWs = Common.SerializeJSObject(pInfo);
break;
case findRadiusFromXY:
o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { Point.class, Integer.class, ProximityOptions.class });
pInfo = cProximity.findRadiusFromXY((Point)o[0], (Integer)o[1], (ProximityOptions)o[2], tk.getId());
respostaWs = Common.SerializeJSObject(pInfo);
break;
case findFromExtent:
o = Common.getArrayByJSon(proxy.getParameters("tjss"), new Class[] { Extent.class, ProximityOptions.class });
pInfo = cProximity.findFromExtent((Extent)o[0], (ProximityOptions)o[1], tk.getId());
respostaWs = Common.SerializeJSObject(pInfo);
break;
}
return respostaWs;
}