use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.
the class WsdlGeneratorTest method testWsdlXmlValidatorWithWsdl.
@Test
public void testWsdlXmlValidatorWithWsdl() throws Exception {
PipeLine pipeline = createPipeline();
WsdlXmlValidator inputValidator = new WsdlXmlValidator();
inputValidator.setWsdl(validateResource("/WsdlGenerator/HelloWorld.wsdl"));
inputValidator.setSoapBody("HelloWorld_Request");
inputValidator.setOutputSoapBody("HelloWorld_Response");
inputValidator.setSoapBodyNamespace("http://dummy.nl/HelloWorld");
inputValidator.setThrowException(true);
pipeline.setInputValidator(inputValidator);
pipeline.getAdapter().configure();
WsdlGenerator generator = new WsdlGenerator(pipeline);
assertNotNull(generator);
generator.init();
ByteArrayOutputStream out = new ByteArrayOutputStream();
generator.wsdl(out, "dummyServlet");
String result = new String(out.toByteArray());
result = result.replaceAll("[0-9]{4}-.*:[0-9]{2}", "DATETIME");
TestAssertions.assertEqualsIgnoreCRLF(TestFileUtils.getTestFile("/WsdlGenerator/GeneratedHelloWorld.wsdl"), result);
}
use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.
the class WsdlTest method wubFindIntermediary.
@Test
public void wubFindIntermediary() throws XMLStreamException, IOException, SAXException, ParserConfigurationException, URISyntaxException, ConfigurationException, NamingException {
PipeLine pipe = mockPipeLine(getXmlValidatorInstance("FindIntermediaryREQ", null, null, "http://wub2nn.nn.nl/FindIntermediary WsdlTest/FindIntermediary/xsd/XSD_FindIntermediary_v1.1_r1.0.xsd"), getXmlValidatorInstance("FindIntermediaryRLY", null, null, "http://wub2nn.nn.nl/FindIntermediary WsdlTest/FindIntermediary/xsd/XSD_FindIntermediary_v1.1_r1.0.xsd"), "http://wub2nn.nn.nl/FindIntermediary", "WsdlTest/FindIntermediary");
WsdlGenerator wsdl = new WsdlGenerator(pipe);
wsdl.init();
wsdl.setUseIncludes(true);
assertTrue(wsdl.isUseIncludes());
test(wsdl, "WsdlTest/FindIntermediary.test.wsdl");
zip(wsdl);
// assertEquals(2, wsdl.getXSDs(true).size()); TODO?
}
use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.
the class WsdlTest method wubCalculateQuoteAndPolicyValuesLifeRetailMixed.
@Test
public void wubCalculateQuoteAndPolicyValuesLifeRetailMixed() throws XMLStreamException, IOException, SAXException, ParserConfigurationException, URISyntaxException, ConfigurationException, NamingException {
XmlValidator inputValidator = getXmlValidatorInstance("CalculationRequest", "CalculationResponse", null, "http://wub2nn.nn.nl/CalculateQuoteAndPolicyValuesLifeRetail WsdlTest/CalculateQuoteAndPolicyValuesLifeRetail/xsd/CalculationRequestv2.1.xsd " + "http://wub2nn.nn.nl/CalculateQuoteAndPolicyValuesLifeRetail_response WsdlTest/CalculateQuoteAndPolicyValuesLifeRetail/xsd/CalculationRespons.xsd");
IValidator outputValidator = inputValidator.getResponseValidator();
PipeLine pipe = mockPipeLine(inputValidator, outputValidator, "http://wub2nn.nn.nl/CalculateQuoteAndPolicyValuesLifeRetail", "WsdlTest/CalculateQuoteAndPolicyValuesLifeRetail");
WsdlGenerator wsdl = new WsdlGenerator(pipe);
wsdl.init();
wsdl.setUseIncludes(true);
test(wsdl, "WsdlTest/CalculateQuoteAndPolicyValuesLifeRetail.test.wsdl");
}
use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.
the class WsdlTest method wubFindIntermediaryMixed.
@Test
public void wubFindIntermediaryMixed() throws XMLStreamException, IOException, SAXException, ParserConfigurationException, URISyntaxException, ConfigurationException, NamingException {
XmlValidator inputValidator = getXmlValidatorInstance("FindIntermediaryREQ", "FindIntermediaryRLY", null, "http://wub2nn.nn.nl/FindIntermediary WsdlTest/FindIntermediary/xsd/XSD_FindIntermediary_v1.1_r1.0.xsd");
IValidator outputValidator = inputValidator.getResponseValidator();
PipeLine pipe = mockPipeLine(inputValidator, outputValidator, "http://wub2nn.nn.nl/FindIntermediary", "WsdlTest/FindIntermediary");
WsdlGenerator wsdl = new WsdlGenerator(pipe);
wsdl.setUseIncludes(true);
wsdl.init();
assertTrue(wsdl.isUseIncludes());
test(wsdl, "WsdlTest/FindIntermediary.test.wsdl");
zip(wsdl);
// assertEquals(2, wsdl.getXSDs(true).size()); TODO?
}
use of nl.nn.adapterframework.core.PipeLine in project iaf by ibissource.
the class WsdlTest method noroottagAndInclude.
@Test
@Ignore("not finished, but would fail, you must specify root tag now.")
public void noroottagAndInclude() 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.setUseIncludes(true);
test(wsdl, "WsdlTest/noroottag.test.wsdl");
}
Aggregations