@Override protected boolean runInVm(String[] arguments, OutputStream out) { WsgenTool compTool = new WsgenTool(out); return compTool.run(arguments); }
@Override protected boolean runInVm(String[] arguments, OutputStream out) { WsgenTool compTool = new WsgenTool(out); return compTool.run(arguments); }
@Override public boolean wsgen(OutputStream logStream, Container container, String[] args) { WsgenTool tool = new WsgenTool(logStream, container); return tool.run(args); } }
@Override protected boolean runInVm(String[] arguments, OutputStream out) { WsgenTool compTool = new WsgenTool(out); return compTool.run(arguments); }
@Override protected boolean runInVm(String[] arguments, OutputStream out) { WsgenTool compTool = new WsgenTool(out); return compTool.run(arguments); }
@Override public boolean wsgen(OutputStream logStream, Container container, String[] args) { WsgenTool tool = new WsgenTool(logStream, container); return tool.run(args); } }
@Override public boolean wsgen(OutputStream logStream, Container container, String[] args) { WsgenTool tool = new WsgenTool(logStream, container); return tool.run(args); } }
@Override public boolean wsgen(OutputStream logStream, Container container, String[] args) { WsgenTool tool = new WsgenTool(logStream, container); return tool.run(args); } }
/** * Entry point for tool integration. * * <p> * This does the same as {@link #main(String[])} except * it doesn't invoke {@link System#exit(int)}. This method * also doesn't play with classloaders. It's the caller's * responsibility to set up the classloader to load all jars * needed to run the tool. * * @return * 0 if the tool runs successfully. */ public static int doMain(String[] args) throws Throwable { return new WsgenTool(System.out).run(args) ? 0 : 1; } }
/** * Entry point for tool integration. * * <p> * This does the same as {@link #main(String[])} except * it doesn't invoke {@link System#exit(int)}. This method * also doesn't play with classloaders. It's the caller's * responsibility to set up the classloader to load all jars * needed to run the tool. * * @return * 0 if the tool runs successfully. */ public static int doMain(String[] args) throws Throwable { return new WsgenTool(System.out).run(args) ? 0 : 1; } }
/** * Entry point for tool integration. * * <p> * This does the same as {@link #main(String[])} except * it doesn't invoke {@link System#exit(int)}. This method * also doesn't play with classloaders. It's the caller's * responsibility to set up the classloader to load all jars * needed to run the tool. * * @return * 0 if the tool runs successfully. */ public static int doMain(String[] args) throws Throwable { return new WsgenTool(System.out).run(args) ? 0 : 1; } }
/** * Entry point for tool integration. * * <p> * This does the same as {@link #main(String[])} except * it doesn't invoke {@link System#exit(int)}. This method * also doesn't play with classloaders. It's the caller's * responsibility to set up the classloader to load all jars * needed to run the tool. * * @return * 0 if the tool runs successfully. */ public static int doMain(String[] args) throws Throwable { return new WsgenTool(System.out).run(args) ? 0 : 1; } }
/** * Generate. * * @throws Exception * the exception */ public void generate() throws Exception { LogOutputStream logOutputStream = new LogOutputStream(log, Integer.MAX_VALUE); WsgenTool genTool = new WsgenTool(logOutputStream); List<String> args = new ArrayList<String>(); configurImportToolOptions(args); mergeOriginalArgs(args); boolean success = genTool.run(args.toArray(new String[args.size()])); if (success) { log.info("Code generation completed"); } }
/** * Generate. * * @throws Exception * the exception */ public void generate() throws Exception { WsgenTool genTool = new WsgenTool(new WriterOutputStream(new LogWriter(log))); List<String> args = new ArrayList<String>(); configurImportToolOptions(args); mergeOriginalArgs(args); boolean success = genTool.run(args.toArray(new String[args.size()])); if (success) { log.info("Code generation completed"); } }
public void testRemoteException() { options.add("-r"); options.add(destDir.getAbsolutePath()); options.add("-wsdl"); options.add("-inlineSchemas"); options.add("-verbose"); options.add("com.sun.tools.ws.processor.modeler.annotation.RMITestWs"); WsgenTool wsgen = new WsgenTool(System.out); wsgen.run(options.toArray(new String[options.size()])); WsgenOptions opts = getOptions(wsgen); int count = 0; for (File f : opts.getGeneratedFiles()) { count++; } Assert.assertEquals(11, count); try { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new File(destDir, "RMITestWsService.wsdl")); NodeList faults = doc.getElementsByTagName("fault"); Assert.assertEquals("CustomEx", faults.item(1).getAttributes().getNamedItem("name").getTextContent()); Assert.assertEquals(faults.item(0).getAttributes().getNamedItem("name").getTextContent(), faults.item(1).getAttributes().getNamedItem("name").getTextContent()); Assert.assertEquals(2, faults.getLength()); } catch (ParserConfigurationException | SAXException | IOException ex) { throw new RuntimeException(ex); } }