if (xml_data == null) {
throw new ProcessingException("request-attribute " +
parameter + " is null, no xml-data for processing");
}
SAXParser parser = null;
try {
String sXml = new String(xml_data);
if (getLogger().isDebugEnabled()) {
getLogger().debug("processing : " + sXml);
}
inputSource = new InputSource(new StringReader(sXml));
if (getLogger().isDebugEnabled()) {
getLogger().debug("processing request attribute ");
}
String charset = getCharacterEncoding(response, contentType);
if (charset != null) {
inputSource.setEncoding(charset);
}
parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
parser.parse(inputSource, super.xmlConsumer);
} catch (Exception e) {
getLogger().error("Could not get parser", e);
throw new ProcessingException("Exception in RequestAttributeGenerator.generate()", e);
} finally {
this.manager.release(parser);