ConnectionFactoryManager cxfManager =
new ConnectionFactoryManager();
ConnectionFactoryInterface cxf = cxfManager.getFactory(cxfConfig);
ConnectionInterface cx = cxf.getConnection(userName, password);
IWorkspace iWorkspace = IWorkspaceHelper.narrow(cx.getObject());
ILanguageService sasLanguage = iWorkspace.LanguageService();
sasLanguage.Submit(procedure);
CarriageControlSeqHolder logCarriageControlHldr = new CarriageControlSeqHolder();
LineTypeSeqHolder logLineTypeHldr = new LineTypeSeqHolder();
StringSeqHolder logHldr = new StringSeqHolder();
sasLanguage.FlushLogLines(Integer.MAX_VALUE, logCarriageControlHldr, logLineTypeHldr, logHldr);
System.out.println("==> Log <==");
for (String line: logHldr.value) {
System.out.println(line);
}
CarriageControlSeqHolder holder = new CarriageControlSeqHolder();
LineTypeSeqHolder listLineTypeHldr = new LineTypeSeqHolder();
StringSeqHolder listHldr = new StringSeqHolder();
sasLanguage.FlushListLines(Integer.MAX_VALUE, holder, listLineTypeHldr, listHldr);
System.out.println("==> OUT <==");
/*
for (CarriageControl control: holder.value) {
System.out.println("control -> [" + control.getClass() + ":" + control.value() + "] " + control.toString());
}
for (LineType type: listLineTypeHldr.value) {
System.out.println("type -> [" + type.getClass() + ":" + type.value() + "]" + type.toString());
}
*/
for (String line: listHldr.value) {
System.out.println(line);
}
iWorkspace.Close();
cx.close();
}