use of nl.nn.adapterframework.parameters.ParameterResolutionContext in project iaf by ibissource.
the class XsltSenderTest method basic.
@Test
public void basic() throws SenderException, TimeOutException, ConfigurationException, IOException {
sender.setStyleSheetName("/Xslt/duplicateImport/root.xsl");
sender.configure();
String input = getFile("/Xslt/duplicateImport/in.xml");
log.debug("inputfile [" + input + "]");
String expected = getFile("/Xslt/duplicateImport/out.xml");
ParameterResolutionContext prc = new ParameterResolutionContext(input, session);
String result = sender.sendMessage(null, input, prc);
assertEquals(expected.replaceAll("\\s", ""), result.replaceAll("\\s", ""));
}
use of nl.nn.adapterframework.parameters.ParameterResolutionContext in project iaf by ibissource.
the class ConfigData method activeConfigQuery.
private String activeConfigQuery(IPipeLineSession session, String name, String formJmsRealm, String result) throws PipeRunException {
FixedQuerySender qs = (FixedQuerySender) ibisContext.createBeanAutowireByName(FixedQuerySender.class);
try {
qs.setName("QuerySender");
qs.setJmsRealm(formJmsRealm);
qs.setQueryType("update");
qs.setQuery("UPDATE IBISCONFIG SET ACTIVECONFIG = '" + qs.getDbmsSupport().getBooleanValue(false) + "' WHERE NAME=?");
Parameter param = new Parameter();
param.setName("name");
param.setValue(name);
qs.addParameter(param);
qs.setScalar(true);
qs.configure();
qs.open();
ParameterResolutionContext prc = new ParameterResolutionContext(DUMMY, session);
result = qs.sendMessage(DUMMY, DUMMY, prc);
} catch (Exception t) {
throw new PipeRunException(this, getLogPrefix(session) + "Error occured on executing jdbc query", t);
} finally {
qs.close();
}
return result;
}
Aggregations