/** * 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"); } }
/** * Generate. * * @throws CodeGenerationException * the code generation exception */ public void generate() throws CodeGenerationException { WsimportTool importTool = new WsimportTool(new WriterOutputStream(new LogWriter(log))); ArrayList<String> args = new ArrayList<String>(); configurImportToolOptions(args); mergeOriginalArgs(args); boolean success = importTool.run(args.toArray(new String[args.size()])); if (success) { log.info("Code generation completed"); } }
public static void setupLogging(Session session, Log log, ParameterInclude params) throws AxisFault { // Note that debugging might already be enabled by the mail.debug property and we should // take care to override it. if (log.isTraceEnabled()) { // This is the old behavior: just set debug to true session.setDebug(true); } if (ParamUtils.getOptionalParamBoolean(params, MailConstants.TRANSPORT_MAIL_DEBUG, false)) { // Redirect debug output to where it belongs, namely to the logs! session.setDebugOut(new PrintStream(new WriterOutputStream(new LogWriter(log)), true)); // Only enable debug afterwards since the call to setDebug might already cause debug output session.setDebug(true); } } }