@Test public void testGenerateStoreServiceInterfaceFromWSDL() { JavaServiceGenerator gen=new JavaServiceGenerator(); try { java.net.URL url=ClassLoader.getSystemClassLoader().getResource(STORE_WSDL_LOCATION); gen.createServiceInterfaceFromWSDL(url.getFile(), STORE_WSDL_LOCATION, SRC_PATH); compare("expected/StoreInterface.java.txt", SRC_PATH+"/org/jboss/examples/store/StoreInterface.java"); } catch(Exception e) { e.printStackTrace(); fail("Failed to generate interface: "+e); } }
public void createServiceInterfaceFromWSDL(String wsdlPath, String wsdlLocation, String srcFolder) throws Exception { String filePath=getXJCBindingFilePath(); String[] cxfargs=new String[]{ "-d", srcFolder, "-wsdlLocation", wsdlLocation, "-b", filePath, wsdlPath }; org.apache.cxf.tools.wsdlto.WSDLToJava wsdlToJava=new org.apache.cxf.tools.wsdlto.WSDLToJava(cxfargs); try { wsdlToJava.run(new ToolContext()); } catch(Exception e) { logger.log(Level.SEVERE, "Failed to generate Java interfaces", e); throw e; } }
JavaServiceGenerator { public void createServiceInterfaceFromWSDL(String wsdlPath, String wsdlLocation, String srcFolder) throws Exception { String filePath=getXJCBindingFilePath(); String[] cxfargs=new String[]{ "-d", srcFolder, "-wsdlLocation", wsdlLocation, "-b", filePath, wsdlPath }; org.apache.cxf.tools.wsdlto.WSDLToJava wsdlToJava=new org.apache.cxf.tools.wsdlto.WSDLToJava(cxfargs); try { wsdlToJava.run(new ToolContext()); } catch(Exception e) { logger.log(Level.SEVERE, "Failed to generate Java interfaces", e); throw e; } } }
JavaServiceGenerator { public void createServiceInterfaceFromWSDL(String wsdlPath, String wsdlLocation, String srcFolder) throws Exception { String filePath=getXJCBindingFilePath(); String[] cxfargs=new String[]{ "-d", srcFolder, "-wsdlLocation", wsdlLocation, "-b", filePath, wsdlPath }; org.apache.cxf.tools.wsdlto.WSDLToJava wsdlToJava=new org.apache.cxf.tools.wsdlto.WSDLToJava(cxfargs); try { wsdlToJava.run(new ToolContext()); } catch(Exception e) { logger.log(Level.SEVERE, "Failed to generate Java interfaces", e); throw e; } } JavaServiceGenerator(); }
JavaServiceGenerator { public void createServiceInterfaceFromWSDL(String wsdlPath, String wsdlLocation, String srcFolder) throws Exception { String filePath=getXJCBindingFilePath(); String[] cxfargs=new String[]{ "-d", srcFolder, "-wsdlLocation", wsdlLocation, "-b", filePath, wsdlPath }; org.apache.cxf.tools.wsdlto.WSDLToJava wsdlToJava=new org.apache.cxf.tools.wsdlto.WSDLToJava(cxfargs); try { wsdlToJava.run(new ToolContext()); } catch(Exception e) { logger.log(Level.SEVERE, "Failed to generate Java interfaces", e); throw e; } } JavaServiceGenerator(); static void main(String[] args); void createServiceInterfaceFromWSDL(String wsdlPath, String wsdlLocation, String srcFolder); void createServiceImplementationFromWSDL(Role role, java.util.List<Role> refRoles,
							ProtocolModel behaviour, String wsdlPath, String wsdlLocation,
						java.util.List<String> refWsdlPaths, String srcFolder,
						ResourceLocator locator); }
JavaServiceGenerator { public void createServiceInterfaceFromWSDL(String wsdlPath, String wsdlLocation, String srcFolder) throws Exception { String filePath=getXJCBindingFilePath(); String[] cxfargs=new String[]{ "-d", srcFolder, "-wsdlLocation", wsdlLocation, "-b", filePath, wsdlPath }; org.apache.cxf.tools.wsdlto.WSDLToJava wsdlToJava=new org.apache.cxf.tools.wsdlto.WSDLToJava(cxfargs); try { wsdlToJava.run(new ToolContext()); } catch(Exception e) { logger.log(Level.SEVERE, "Failed to generate Java interfaces", e); throw e; } } JavaServiceGenerator(); static void main(String[] args); void createServiceInterfaceFromWSDL(String wsdlPath, String wsdlLocation, String srcFolder); void createServiceImplementationFromWSDL(Role role, java.util.List<Role> refRoles,
							ProtocolModel behaviour, String wsdlPath, String wsdlLocation,
						java.util.List<String> refWsdlPaths, String srcFolder,
						ResourceLocator locator);  }