Search in sources :

Example 1 with SoapWrapperPipe

use of nl.nn.adapterframework.soap.SoapWrapperPipe in project iaf by ibissource.

the class MessageSendingPipeTest method testOutputWrapped.

@Test
public void testOutputWrapped() throws Exception {
    pipe.setOutputWrapper(new SoapWrapperPipe());
    pipe.setPipeProcessor(new CorePipeProcessor());
    configureAndStartPipe();
    PipeRunResult prr = doPipe("testMessage");
    assertEquals("success", prr.getPipeForward().getName());
    String expected = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Body>{ \"input\": \"testMessage\"}</soapenv:Body></soapenv:Envelope>";
    assertEquals(expected, prr.getResult().asString());
}
Also used : PipeRunResult(nl.nn.adapterframework.core.PipeRunResult) CorePipeProcessor(nl.nn.adapterframework.processors.CorePipeProcessor) SoapWrapperPipe(nl.nn.adapterframework.soap.SoapWrapperPipe) Test(org.junit.Test)

Example 2 with SoapWrapperPipe

use of nl.nn.adapterframework.soap.SoapWrapperPipe in project iaf by ibissource.

the class MessageSendingPipeTest method testInputWrapped.

@Test
public void testInputWrapped() throws Exception {
    pipe.setInputWrapper(new SoapWrapperPipe());
    pipe.setPipeProcessor(new CorePipeProcessor());
    configureAndStartPipe();
    PipeRunResult prr = doPipe("testMessage");
    assertEquals("success", prr.getPipeForward().getName());
    String expected = "{ \"input\": \"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Body>testMessage</soapenv:Body></soapenv:Envelope>\"}";
    assertEquals(expected, prr.getResult().asString());
}
Also used : PipeRunResult(nl.nn.adapterframework.core.PipeRunResult) CorePipeProcessor(nl.nn.adapterframework.processors.CorePipeProcessor) SoapWrapperPipe(nl.nn.adapterframework.soap.SoapWrapperPipe) Test(org.junit.Test)

Aggregations

PipeRunResult (nl.nn.adapterframework.core.PipeRunResult)2 CorePipeProcessor (nl.nn.adapterframework.processors.CorePipeProcessor)2 SoapWrapperPipe (nl.nn.adapterframework.soap.SoapWrapperPipe)2 Test (org.junit.Test)2