public @ResponseBody void style(@RequestBody byte[] rawStyle, @PathVariable String wsName,
@PathVariable String name, @RequestParam(value="map", required=false) String mapName) throws IOException {
// first thing is sanity check on the style content
List<MarkedYAMLException> errors = Ysld.validate(ByteSource.wrap(rawStyle).openStream());
if (!errors.isEmpty()) {
throw new InvalidYsldException(errors);
}
Catalog cat = geoServer.getCatalog();
WorkspaceInfo ws = findWorkspace(wsName, cat);
LayerInfo l = findLayer(wsName, name, cat);