final List<MapLayerInfo> layers = new ArrayList<MapLayerInfo>();
final List<Style> styles = new ArrayList<Style>();
MapLayerInfo currLayer;
StyledLayer sl = null;
for (int i = 0; i < slCount; i++) {
sl = styledLayers[i];
String layerName = sl.getName();
if (null == layerName) {
throw new ServiceException("A UserLayer without layer name was passed");
}