Search in sources :

Example 16 with PipeLine

use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.

the class WsdlTest method noroottag.

@Test
public void noroottag() throws XMLStreamException, IOException, SAXException, ParserConfigurationException, URISyntaxException, ConfigurationException, NamingException {
    PipeLine simple = mockPipeLine(getXmlValidatorInstance(null, "WsdlTest/test.xsd", "urn:webservice1 WsdlTest/test.xsd"), getXmlValidatorInstance("b", "WsdlTest/test.xsd", "urn:webservice1 WsdlTest/test.xsd"), "urn:webservice1", "TestRootTag");
    WsdlGenerator wsdl = new WsdlGenerator(simple);
    wsdl.init();
    test(wsdl, "WsdlTest/noroottag.test.wsdl");
}
Also used : PipeLine(nl.nn.adapterframework.core.PipeLine) XmlValidatorTest(nl.nn.adapterframework.pipes.XmlValidatorTest) Test(org.junit.Test)

Example 17 with PipeLine

use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.

the class WsdlTest method basic.

@Test
public void basic() throws XMLStreamException, IOException, ParserConfigurationException, SAXException, ConfigurationException, URISyntaxException, NamingException {
    PipeLine simple = mockPipeLine(getXmlValidatorInstance("a", "WsdlTest/test.xsd", "urn:webservice1 WsdlTest/test.xsd"), getXmlValidatorInstance("b", "WsdlTest/test.xsd", "urn:webservice1 WsdlTest/test.xsd"), "urn:webservice1", "Test1");
    WsdlGenerator wsdl = new WsdlGenerator(simple);
    wsdl.init();
    test(wsdl, "WsdlTest/webservice1.test.wsdl");
}
Also used : PipeLine(nl.nn.adapterframework.core.PipeLine) XmlValidatorTest(nl.nn.adapterframework.pipes.XmlValidatorTest) Test(org.junit.Test)

Example 18 with PipeLine

use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.

the class WsdlTest method includeXsdInWsdlMixed.

@Test
public void includeXsdInWsdlMixed() throws XMLStreamException, IOException, ParserConfigurationException, SAXException, ConfigurationException, URISyntaxException, NamingException {
    XmlValidator inputValidator = getXmlValidatorInstance("a", "b", "WsdlTest/test.xsd", "urn:webservice1 WsdlTest/test.xsd");
    IValidator outputValidator = inputValidator.getResponseValidator();
    PipeLine simple = mockPipeLine(inputValidator, outputValidator, "urn:webservice1", "IncludeXsds");
    WsdlGenerator wsdl = new WsdlGenerator(simple);
    wsdl.setUseIncludes(true);
    wsdl.init();
    test(wsdl, "WsdlTest/includexsds.test.wsdl");
}
Also used : XmlValidator(nl.nn.adapterframework.pipes.XmlValidator) AbstractXmlValidator(nl.nn.adapterframework.validation.AbstractXmlValidator) XercesXmlValidator(nl.nn.adapterframework.validation.XercesXmlValidator) JavaxXmlValidator(nl.nn.adapterframework.validation.JavaxXmlValidator) IValidator(nl.nn.adapterframework.core.IValidator) PipeLine(nl.nn.adapterframework.core.PipeLine) XmlValidatorTest(nl.nn.adapterframework.pipes.XmlValidatorTest) Test(org.junit.Test)

Example 19 with PipeLine

use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.

the class ReceiverTest method setupAdapter.

public Adapter setupAdapter(Receiver<String> receiver) throws Exception {
    Adapter adapter = configuration.createBean(Adapter.class);
    adapter.setName("ReceiverTestAdapterName");
    PipeLine pl = new PipeLine();
    pl.setFirstPipe("dummy");
    EchoPipe pipe = new EchoPipe();
    pipe.setName("dummy");
    pl.addPipe(pipe);
    PipeLineExit ple = new PipeLineExit();
    ple.setPath("success");
    ple.setState(ExitState.SUCCESS);
    pl.registerPipeLineExit(ple);
    adapter.setPipeLine(pl);
    adapter.registerReceiver(receiver);
    configuration.registerAdapter(adapter);
    return adapter;
}
Also used : EchoPipe(nl.nn.adapterframework.pipes.EchoPipe) Adapter(nl.nn.adapterframework.core.Adapter) PipeLine(nl.nn.adapterframework.core.PipeLine) PipeLineExit(nl.nn.adapterframework.core.PipeLineExit)

Example 20 with PipeLine

use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.

the class CleanupDatabaseJobTest method setupAdapter.

private Adapter setupAdapter() throws ConfigurationException {
    Adapter adapter = configuration.createBean(Adapter.class);
    adapter.setName("fakeAdapter");
    PipeLine pipeline = configuration.createBean(PipeLine.class);
    storage = configuration.createBean(JdbcTransactionalStorage.class);
    storage.setName("test-cleanupDB");
    storage.setType("A");
    storage.setSlotId("dummySlotId");
    storage.setTableName(tableName);
    storage.setSequenceName("SEQ_" + tableName);
    storage.setDatasourceName(getDataSourceName());
    MessageSendingPipe pipe = new MessageSendingPipe();
    pipe.setName("dummyPipe");
    pipe.setMessageLog(storage);
    pipeline.addPipe(pipe);
    adapter.setPipeLine(pipeline);
    return adapter;
}
Also used : MessageSendingPipe(nl.nn.adapterframework.pipes.MessageSendingPipe) Adapter(nl.nn.adapterframework.core.Adapter) PipeLine(nl.nn.adapterframework.core.PipeLine) JdbcTransactionalStorage(nl.nn.adapterframework.jdbc.JdbcTransactionalStorage)

Aggregations

PipeLine (nl.nn.adapterframework.core.PipeLine)43 Adapter (nl.nn.adapterframework.core.Adapter)19 Test (org.junit.Test)17 XmlValidatorTest (nl.nn.adapterframework.pipes.XmlValidatorTest)12 IPipe (nl.nn.adapterframework.core.IPipe)10 PipeLineExit (nl.nn.adapterframework.core.PipeLineExit)8 MessageSendingPipe (nl.nn.adapterframework.pipes.MessageSendingPipe)8 IOException (java.io.IOException)6 IValidator (nl.nn.adapterframework.core.IValidator)6 XmlValidator (nl.nn.adapterframework.pipes.XmlValidator)6 Configuration (nl.nn.adapterframework.configuration.Configuration)5 PipeForward (nl.nn.adapterframework.core.PipeForward)5 PipeRunResult (nl.nn.adapterframework.core.PipeRunResult)5 Message (nl.nn.adapterframework.stream.Message)5 AbstractXmlValidator (nl.nn.adapterframework.validation.AbstractXmlValidator)5 JavaxXmlValidator (nl.nn.adapterframework.validation.JavaxXmlValidator)5 XercesXmlValidator (nl.nn.adapterframework.validation.XercesXmlValidator)5 ArrayList (java.util.ArrayList)4 Iterator (java.util.Iterator)4 ConfigurationException (nl.nn.adapterframework.configuration.ConfigurationException)4