Search in sources :

Example 16 with PipeForward

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

the class WsdlXmlValidatorMixedModeTest method getMixedValidator.

public WsdlXmlValidator getMixedValidator() throws ConfigurationException {
    WsdlXmlValidator val = new ApiWsdlXmlValidator();
    val.setWsdl(WSDL);
    val.setSoapBody(REQUEST_SOAP_BODY);
    val.setOutputSoapBody(RESPONSE_SOAP_BODY);
    val.setThrowException(true);
    val.setSchemaLocation("http://ibissource.org/XSD/Generic/MessageHeader/2 schema1 http://api.ibissource.org/GetPolicyDetails schema2");
    val.registerForward(new PipeForward("success", null));
    val.configure();
    val.getResponseValidator().configure();
    return val;
}
Also used : ApiWsdlXmlValidator(nl.nn.adapterframework.extensions.api.ApiWsdlXmlValidator) PipeForward(nl.nn.adapterframework.core.PipeForward) ApiWsdlXmlValidator(nl.nn.adapterframework.extensions.api.ApiWsdlXmlValidator)

Example 17 with PipeForward

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

the class WsdlXmlValidatorMixedModeTest method getInputValidator.

public WsdlXmlValidator getInputValidator() throws ConfigurationException {
    WsdlXmlValidator val = new ApiWsdlXmlValidator();
    val.setWsdl(WSDL);
    val.setSoapBody(REQUEST_SOAP_BODY);
    val.setThrowException(true);
    val.setSchemaLocation("http://ibissource.org/XSD/Generic/MessageHeader/2 schema1 http://api.ibissource.org/GetPolicyDetails schema2");
    val.registerForward(new PipeForward("success", null));
    val.configure();
    return val;
}
Also used : ApiWsdlXmlValidator(nl.nn.adapterframework.extensions.api.ApiWsdlXmlValidator) PipeForward(nl.nn.adapterframework.core.PipeForward) ApiWsdlXmlValidator(nl.nn.adapterframework.extensions.api.ApiWsdlXmlValidator)

Example 18 with PipeForward

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

the class WsdlXmlValidatorTest method wsdlValidateWithInclude.

@Test
public void wsdlValidateWithInclude() throws IOException, PipeRunException, SAXException, WSDLException, ConfigurationException, XmlValidatorException {
    WsdlXmlValidator val = new WsdlXmlValidator();
    val.setWsdl(SIMPLE_WITH_INCLUDE);
    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 19 with PipeForward

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

the class WsdlXmlValidatorTest method wsdlValidate.

@Test
public void wsdlValidate() throws IOException, PipeRunException, SAXException, WSDLException, ConfigurationException, XmlValidatorException {
    WsdlXmlValidator val = new WsdlXmlValidator();
    val.setWsdl(SIMPLE);
    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 20 with PipeForward

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

the class WsdlXmlValidatorTest method wsdlTibco.

@Test
public void wsdlTibco() throws IOException, PipeRunException, SAXException, WSDLException, ConfigurationException, XmlValidatorException {
    WsdlXmlValidator val = new WsdlXmlValidator();
    val.setWsdl(TIBCO);
    val.setSoapHeader("MessageHeader");
    val.setSoapBody("Request");
    val.setThrowException(true);
    val.registerForward(new PipeForward("success", null));
    val.configure();
    val.validate("<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" + "  <Header>\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" + "  </Header>\n" + "  <Body>\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" + "  </Body>\n" + "</Envelope>\n" + "", session);
}
Also used : PipeForward(nl.nn.adapterframework.core.PipeForward) Test(org.junit.Test)

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