testLoader("http://localhost:" + getPort() + "/wsdls/test8/TestService.wsdl");
testLoader("http://localhost:" + getPort() + "/wsdls/testonewayop/TestService.wsdl");
}
private void testLoader(String wsdlUrl) throws Exception {
WsdlProject project = new WsdlProject();
project.getSettings().setBoolean(WsdlSettings.CACHE_WSDLS, true);
WsdlInterface wsdlInterface = WsdlImporter.importWsdl(project, wsdlUrl)[0];
assertTrue(wsdlInterface.isCached());
WsdlDefinitionExporter exporter = new WsdlDefinitionExporter(wsdlInterface);
String root = exporter.export(OUTPUT_FOLDER_BASE_PATH + "test" + File.separatorChar + "output");
WsdlProject project2 = new WsdlProject();
WsdlInterface wsdl2 = WsdlImporter.importWsdl(project2, new File(root).toURI().toURL().toString())[0];
assertEquals(wsdlInterface.getBindingName(), wsdl2.getBindingName());
assertEquals(wsdlInterface.getOperationCount(), wsdl2.getOperationCount());
assertEquals(wsdlInterface.getWsdlContext().getInterfaceDefinition().getDefinedNamespaces(), wsdl2