/////// for testing public static void main(String[] args) { if (args.length != 4) { System.out.println("usage: java RTFGenerator dtabaseurl dbuser password xmlfile"); return; } RTFGenerator rt = new RTFGenerator(); try { DBInterface.initialize(args[0], args[1], args[2]); } catch (Exception exp) { String e = exp.toString(); e = exp.getMessage(); e = ""; } try { rt.initialize("BS_ORDER", "RTF_GENERATOR"); } catch (Exception exp) { exp.printStackTrace(); } try { String xmlmessage = FileUtils.readFile(args[3]); rt.execute(null, xmlmessage); } catch (Exception exp) { exp.printStackTrace(); } }
public static void main(String[] args) { Debug.enable(Debug.UNIT_TEST); Debug.enable(Debug.BENCHMARK); Debug.showLevels(); if (args.length != 3) { Debug.log( Debug.ALL_ERRORS, "UnBatcher: USAGE: " + " jdbc:oracle:thin:@192.168.164.238:1521:e911 e911 e911 "); return; } try { DBInterface.initialize(args[0], args[1], args[2]); } catch (DatabaseException e) { Debug.log( Debug.MAPPING_ERROR, "UnBatcher: " + "Database initialization failure: " + e.getMessage()); } Splitter spl = new Splitter(); try { MessageProcessorContext mpx = new MessageProcessorContext(); mpx.set("FileName", "MANS9999"); String s = FileUtils.readFile("D:\\Response\\DECCCORR.txt"); System.out.println("length----------->>>>>" + s.length()); MessageObject msob = new MessageObject(); msob.set(s); spl.initialize("E911BATCHER", "FAX_MESSAGE_SPLITTER"); spl.process(mpx, msob); } catch (Exception ex) { System.out.println(ex.getMessage()); } }