Search in sources :

Example 21 with PipeForward

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

the class WsdlXmlValidatorTest method wsdlValidateWithReferenceFail.

@Test(expected = XmlValidatorException.class)
public void wsdlValidateWithReferenceFail() throws IOException, PipeRunException, SAXException, WSDLException, ConfigurationException, XmlValidatorException {
    WsdlXmlValidator val = new WsdlXmlValidator();
    val.setWsdl(SIMPLE_WITH_REFERENCE);
    val.setThrowException(true);
    val.registerForward(new PipeForward("success", null));
    val.configure();
    val.validate("<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\"><Body><TradePriceRequest xmlns=\"http://example.com/stockquote.xsd\"><tickerSymbolERROR>foo</tickerSymbolERROR></TradePriceRequest></Body></Envelope>", session);
}
Also used : PipeForward(nl.nn.adapterframework.core.PipeForward) Test(org.junit.Test)

Example 22 with PipeForward

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

the class WsdlXmlValidatorTest method wsdlValidateWithReference.

@Test
public void wsdlValidateWithReference() throws IOException, PipeRunException, SAXException, WSDLException, ConfigurationException, XmlValidatorException {
    WsdlXmlValidator val = new WsdlXmlValidator();
    val.setWsdl(SIMPLE_WITH_REFERENCE);
    val.setSoapBody("TradePriceRequest");
    val.setThrowException(true);
    val.registerForward(new PipeForward("success", null));
    val.configure();
    val.validate("<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\"><Body><TradePriceRequest xmlns=\"http://example.com/stockquote.xsd\"><tickerSymbol>foo</tickerSymbol></TradePriceRequest></Body></Envelope>", session);
}
Also used : PipeForward(nl.nn.adapterframework.core.PipeForward) Test(org.junit.Test)

Example 23 with PipeForward

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

the class WsdlXmlValidatorTest method wsdlTibcoFailEnvelop.

@Test(expected = XmlValidatorException.class)
public void wsdlTibcoFailEnvelop() throws IOException, PipeRunException, SAXException, WSDLException, ConfigurationException, XmlValidatorException {
    WsdlXmlValidator val = new WsdlXmlValidator();
    val.setWsdl(TIBCO);
    val.setThrowException(true);
    val.registerForward(new PipeForward("success", null));
    val.configure();
    val.validate("<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" + "  <BodyERROR>\n" + "    <MessageHeader xmlns=\"http://www.ing.com/CSP/XSD/General/Message_2\">\n" + "      <From>\n" + "        <Id>Ibis4Toegang</Id>\n" + "      </From>\n" + "      <HeaderFields>\n" + "        <ConversationId/>\n" + "        <MessageId>WPNLD8921975_0a4ac029-7747a1ed_12da7d4b033_-7ff3</MessageId>\n" + "        <ExternalRefToMessageId/>\n" + "        <Timestamp>2001-12-17T09:30:47</Timestamp>\n" + "      </HeaderFields>\n" + "    </MessageHeader>\n" + "    <Request xmlns=\"http://www.ing.com/nl/banking/coe/xsd/bankingcustomer_generate_01/getpartybasicdatabanking_01\">\n" + "      <BankSparen xmlns=\"http://www.ing.com/bis/xsd/nl/banking/bankingcustomer_generate_01_getpartybasicdatabanking_request_01\">\n" + "        <PRD>\n" + "          <KLT>\n" + "            <KLT_NA_RELNUM>181373377001</KLT_NA_RELNUM>\n" + "          </KLT>\n" + "        </PRD>\n" + "      </BankSparen>\n" + "    </Request>\n" + "  </BodyERROR>\n" + "</Envelope>\n" + "", session);
}
Also used : PipeForward(nl.nn.adapterframework.core.PipeForward) Test(org.junit.Test)

Example 24 with PipeForward

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

the class XmlValidatorTest2 method getSuccess.

static PipeForward getSuccess() {
    PipeForward forward = new PipeForward();
    forward.setName("success");
    return forward;
}
Also used : PipeForward(nl.nn.adapterframework.core.PipeForward)

Example 25 with PipeForward

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

the class XsltPipeErrorTest method createPipeSuccessForward.

private PipeForward createPipeSuccessForward() {
    PipeForward pipeForward = new PipeForward();
    pipeForward.setName("success");
    return pipeForward;
}
Also used : PipeForward(nl.nn.adapterframework.core.PipeForward)

Aggregations

PipeForward (nl.nn.adapterframework.core.PipeForward)49 PipeRunResult (nl.nn.adapterframework.core.PipeRunResult)23 PipeRunException (nl.nn.adapterframework.core.PipeRunException)21 ConfigurationException (nl.nn.adapterframework.configuration.ConfigurationException)10 Test (org.junit.Test)8 IOException (java.io.IOException)7 ParameterResolutionContext (nl.nn.adapterframework.parameters.ParameterResolutionContext)7 ParameterException (nl.nn.adapterframework.core.ParameterException)6 ParameterList (nl.nn.adapterframework.parameters.ParameterList)6 IPipe (nl.nn.adapterframework.core.IPipe)4 Map (java.util.Map)3 TransformerConfigurationException (javax.xml.transform.TransformerConfigurationException)3 ConfigurationWarnings (nl.nn.adapterframework.configuration.ConfigurationWarnings)3 IPipeLineSession (nl.nn.adapterframework.core.IPipeLineSession)3 ITransactionalStorage (nl.nn.adapterframework.core.ITransactionalStorage)3 PipeLineSessionBase (nl.nn.adapterframework.core.PipeLineSessionBase)3 ApiWsdlXmlValidator (nl.nn.adapterframework.extensions.api.ApiWsdlXmlValidator)3 ParameterValueList (nl.nn.adapterframework.parameters.ParameterValueList)3 StatisticsKeeper (nl.nn.adapterframework.statistics.StatisticsKeeper)3 InputStream (java.io.InputStream)2