skuero

Problem getting the map

Discussion created by skuero on Sep 3, 2013
Latest reply on Sep 5, 2013 by skuero
I have a problem with the following line of code, I use a SOE.
 public static IMap getMyMap(IServerObjectHelper serverObject) throws IOException{
  
  IMapServer2 mapServer_2 = (IMapServer2) serverObject.getServerObject();  
  IMapServerObjects2 serverObjs_2 = (IMapServerObjects2) mapServer_2;  
  IMap map = serverObjs_2.getMap(mapServer_2.getDefaultMapName());
  
  return map;
 }

when I run it, I get the following error.
AutomationException: No such interface supported


Can anyone help?, What am I doing wrong?

Thank you.

Outcomes