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; }
AutomationException: No such interface supported
SOE development requires knowledge of ArcObjects,.NET or Java, and Web service communication technologies such as REST and SOAP. The ArcObjects SDK has several samples that you can examine, both for Java and .NET.
If you plan on developing new SOEs, keep in mind that in ArcGIS Server 10.1 you will be required to analyze your map documents before publishing them and fix any errors that appear. Thus, one of the things you can do to get your SOE�??s ready for 10.1 is to make sure they work against MSDs at 10.0. Building SOE�??s on top of MSD based map services with ArcGIS Server 10.0 is perfectly possible. The biggest requirement is that you avoid using MXD-specific interfaces (such as IMap, ILayer, anything to do with page layouts, and so on). Here is a blog post describing how you can use IMapServerDataAccess to get to the data sources of an MSD-based map service.
I have a big problem.
Is there any way to know if they are visible or not the fields in a layer? and if it has defined a QueryDefinition?
DefinitionExpression:
The LayerDescription includes a DefinitionExpression. A DefinitionExpression can be set on a layer in order to limit layer features available for display or query. This only applies for the request and does not replace the definition query set in the source map.