: layerDefs);
restBody = restBody.replace("${SIZE}", size == null ? "" : size);
restBody = restBody.replace("${IMAGE_SR}", imageSR == null ? ""
: imageSR);
ServiceHTML html = new ServiceHTML();
html.setContextRoot(contextRoot);
html.setTitle("Export (" + serviceName + ")");
html
.setCatalog(" > <a href='"
+ contextRoot
+ "/rest/service/MapService'>Map Service</a> > <a href='"
+ contextRoot + "/rest/service/MapService/"
+ serviceName + "'>" + serviceName
+ "</a> > Export");
html.setHeader("Export Map Image");
html.setRestBody(restBody);
strResult = html.toString();
result = strResult.getBytes();
} catch (Exception ex) {
ex.printStackTrace();
}