use of nl.nn.adapterframework.pipes.WsdlXmlValidator 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);
}
Aggregations