xml.close();
}
return new Response(status)
.setContentType(Constants.XML_TEXT_TYPE)
.setValue(new ByteArrayValue(baos.toByteArray()));
} catch (UnsupportedEncodingException err) {
throw new IllegalStateException("UnsupportedEncodingException", err);
} catch (XMLStreamException err) {
throw new IllegalStateException("XMLStreamException", err);