diff --git a/src/main/java/org/gcube/data/access/connector/GeoServerConnectorRequestHandler.java b/src/main/java/org/gcube/data/access/connector/GeoServerConnectorRequestHandler.java index ea54aeb..3db686d 100644 --- a/src/main/java/org/gcube/data/access/connector/GeoServerConnectorRequestHandler.java +++ b/src/main/java/org/gcube/data/access/connector/GeoServerConnectorRequestHandler.java @@ -191,9 +191,8 @@ public class GeoServerConnectorRequestHandler extends RequestHandler { int size = gCoreEndpoints.size(); logger.warn("gCoreEndpoints size = " + size); - if (size > 0) { - //TODO I get the last because when there are 2 endpoint the first is not good! Usually it's only one - GCoreEndpoint gCoreEndpoint = gCoreEndpoints.get(size-1); + if (size > 0) {//I get only the first. Usually it must be only one + GCoreEndpoint gCoreEndpoint = gCoreEndpoints.get(0); return gCoreEndpoint.profile().endpointMap().get("org.gcube.spatial.data.sdi.SDIService").uri() .toString(); }