}
//otherwise it's a normal response...
Set<String> legendFormats = GetLegendGraphicResponse.getFormats();
WMSCapsTransformer transformer = new WMSCapsTransformer(request.getBaseUrl(), mapFormats, legendFormats);
// if (request.getWFS().getGeoServer().isVerbose()) {
transformer.setIndentation(2);
final WMS wms = (WMS)applicationContext.getBean("wms");
final Charset encoding = wms.getCharSet();
transformer.setEncoding(encoding);
// }
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
transformer.transform(request, out);
} catch (TransformerException e) {
throw new WmsException(e);
}
this.rawResponse = out.toByteArray();