use of nl.nn.adapterframework.util.XmlJsonWriter in project iaf by ibissource.
the class JsonXsltSender method createHandler.
@Override
protected ContentHandler createHandler(Message input, ThreadConnector threadConnector, PipeLineSession session, MessageOutputStream target) throws StreamingException {
if (!isJsonResult()) {
return super.createHandler(input, threadConnector, session, target);
}
XmlJsonWriter xjw = new XmlJsonWriter(target.asWriter());
MessageOutputStream prev = new MessageOutputStream(this, xjw, target, threadLifeCycleEventListener, txManager, session, null);
ContentHandler handler = super.createHandler(input, threadConnector, session, prev);
if (getXmlDebugger() != null) {
handler = getXmlDebugger().inspectXml(session, "XML to be converted to JSON", handler);
}
return handler;
}
use of nl.nn.adapterframework.util.XmlJsonWriter in project iaf by ibissource.
the class JsonXsltPipe method transform.
@Override
protected String transform(TransformerPool tp, Source source, Map parametervalues) throws TransformerException, IOException {
SAXResult result = new SAXResult();
XmlJsonWriter xjw = new XmlJsonWriter();
result.setHandler(xjw);
tp.transform(source, result, parametervalues);
return xjw.toString();
}
Aggregations