try {
sldUrl = new URL(urlValue);
} catch (MalformedURLException e) {
String msg = "Creating remote SLD url: " + e.getMessage();
LOGGER.log(Level.WARNING, msg, e);
throw new WmsException(e, msg, "parseSldParam");
}
if (getValue("VALIDATESCHEMA") != null)
{
// user requested to validate the schema.
SLDValidator validator = new SLDValidator();
List errors =null;
try {
//JD: GEOS-420, Wrap the sldUrl in getINputStream method in order
// to do compression
InputStream in = getInputStream(sldUrl);
errors = validator.validateSLD(in, request.getHttpServletRequest().getSession().getServletContext());
in.close();
if (errors.size() != 0)
throw new WmsException(SLDValidator.getErrorMessage(sldUrl.openStream(),errors));
}
catch (IOException e)
{
String msg = "Creating remote SLD url: " + e.getMessage();
LOGGER.log(Level.WARNING, msg, e);
throw new WmsException(e, msg, "parseSldParam");
}
}
SLDParser parser;
try {
//JD: GEOS-420, Wrap the sldUrl in getINputStream method in order
// to do compression
parser = new SLDParser(styleFactory, getInputStream( sldUrl));
} catch (IOException e) {
String msg = "Creating remote SLD url: " + e.getMessage();
LOGGER.log(Level.WARNING, msg, e);
throw new WmsException(e, msg, "parseSldParam");
}
StyledLayerDescriptor sld = parser.parseSLD();
parseStyledLayerDescriptor(request, sld);
}