How to get layer ID from a SOAP connection in SOE

616
1
02-03-2017 03:51 AM
MathieuVILLEMONT1
Occasional Contributor

Hi,

I have got a Java SOE that access several MapServices using SOAP.

I would like to get the layer definition of each layer of the MapService in order to retrieve their IDs.

I'm not quite sure how to do that.

Currently I'm able to get the MapServerLayer like this :

MapServerLayer msl = (MapServerLayer) this.currentRequestServerContext
                .createObject(MapServerLayer.getClsid());
try {
  msl.serverConnect(agsServerObjectName,
                mapServer.getDefaultMapName());
} catch (Exception ex) {
  log.error("Problem connect to service: " + url + ". Error detail:",
                    ex);
  return null;
}

Thanks
Tags (3)
0 Kudos
1 Reply
MathieuVILLEMONT1
Occasional Contributor
((MapServerXXXSublayer) layer).getLayerDescription().getID();

is what I needed.

0 Kudos