Menu

#63 getProxies(MyService.class,null) retrieves all services

open
nobody
5
2006-12-29
2006-12-29
No

if you call ClienHelper.getProxies with the String[] argument equal to null, it retrieves all the serviceproxies deployed on FADA (only tried with one node, not on a P2P with several nodes), even though the Service class signature has been specified (blaService.class in my case)
getProxies(BlaService.class,smids); where smids = null but BlaService.class a real class signature.

Other services with different signature (BliService.class) were found that still implemented teh .getEndPoint() method were executed correctly.

ClientHelper ch = new ClientHelper(ServentInfo.getInstance().getPrivateURL());
try
{
Object o1 = ch.getProxies(TagService.class,smids);
System.out.println(o1.getClass());
ArrayList servicesFound = (ArrayList)o1;
System.out.println(servicesFound.size());

for (int i=0;i< servicesFound.size();i++)
{
Object o2 = servicesFound.get(i);
BlaService service = (BlaService)o2;
try
{
System.out.println("Service endPoint: " + service.getEndPoint());

}
catch (Exception ex)
{
ex.printStackTrace();

}

}
}
catch (Exception ex)
{
ex.printStackTrace();
}
}

Discussion


Log in to post a comment.