This topic describes Log Service functions and provides examples for each.
Function Name: deleteLogByJobId
Purpose: Deletes a specific log record as identified by its unique job ID from the underlying repository. This function is available to the administrator and the log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
Job ID. Unique identifier for the job. |
String |
Output
Description |
---|
There is no output for this function. If it fails, it will throw an exception. |
In the following example, the log file for a specific job ID is deleted.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate
SecToken = RCLogon.logon("admin", "")
LAuthenticate.securityToken = SecToken
L.deleteLogByJobId(LAuthenticate, "J0vu6t0lmm01") Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, the log file for a specific job ID is deleted.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
L.deleteLogByJobId(Authobj,"J0vu6t0lmm01"); }
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: deleteLogList
Purpose: Deletes the log records from the underlying repository pertaining to all schedules that were run between a specific time interval delineated by startTime and endTime. If startTime = NULL all log records are deleted before endTime. If endTime = NULL all log records are deleted after. This function is available to the administrator only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
Start time. |
Date |
End time. |
Date |
Output
Description |
---|
There is no output for this function. If it fails, it will throw an exception. |
In the following example, all log files are deleted whose job start time falls within a specific range.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim SDate As Date = New Date(2004, 11, 30, 15, 0, 0) Dim EDate As Date = New Date(2004, 11, 30, 16, 0, 0)
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
L.deleteLogList(LAuthenticate, SDate, EDate) Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, all log files are deleted whose job start time falls within a specific range.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
GregorianCalendar STime = new GregorianCalendar(2004,Calendar.NOVEMBER,30,15,00); GregorianCalendar ETime = new GregorianCalendar(2004,Calendar.NOVEMBER,30,16,00);
L.deleteLogList(Authobj, STime, ETime);
}
catch (Throwable t) { System.err.println(t);
t.printStackTrace(); System.exit(1); }
Function Name: deleteLogListByOwner
Purpose: Deletes the log records from the underlying repository pertaining to all schedules owned by the specified user, and which were run between a specific time interval delineated by startTime and endTime. If startTime = NULL all log records are deleted before endTime. If endTime = NULL all log records are deleted after. This function is available to the administrator and the Log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
Log owner. |
String |
Start time. |
Date |
End time. |
Date |
Output
Description |
---|
There is no output for this function. If it fails, it will throw an exception. |
In the following example, all log files are retrieved for a specific owner whose job start time falls within a specific range.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim SDate As Date = New Date(2004, 11, 30, 15, 0, 0) Dim EDate As Date = New Date(2004, 11, 30, 16, 0, 0)
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
L.deleteLogListByOwner(LAuthenticate, "admin", SDate, EDate) Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, all log files are retrieved for a specific owner whose job start time falls within a specific range.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
GregorianCalendar STime = new GregorianCalendar(2004,Calendar.NOVEMBER,30,15,00); GregorianCalendar ETime = new GregorianCalendar(2004,Calendar.NOVEMBER,30,16,00);
L.deleteLogListByOwner(Authobj,"admin", STime, ETime);
}
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: deleteLogListByScheduleId
Purpose: Deletes log records from the underlying ReportCaster repository associated with a specific schedule as identified by the passed schedule ID. This function is available to the administrator and the log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
The unique schedule identifier. |
String |
Output
Description |
---|
There is no output for this function. If it fails, it will throw an exception. |
In the following example, all the log files for a specific schedule ID are deleted.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
L.deleteLogListByScheduleId(LAuthenticate, "S100fca8v325")
Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, all the log files for a specific schedule ID are deleted.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
L.deleteLogListByScheduleId(Authobj,"S100fca8v325"); }
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: deleteLogListByScheduleIdByCalendar
Purpose: Deletes the log records from the underlying repository pertaining to a specific schedule ID and to only those log jobs which were run between a specific time interval, delineated by startTime and endTime. If startTime = NULL all log records are deleted before endTime. If endTime = NULL all log records are deleted after. This function is available to the administrator and the Log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
The unique schedule identifier. |
String |
Start time. |
Date |
End time. |
Date |
Output
Description |
---|
There is no output for this function. If it fails, it will throw an exception. |
In the following example, all the log files are deleted for a specific schedule ID whose job start time falls within a specific range.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim SDate As Date = New Date(2004, 11, 29, 10, 0, 0) Dim EDate As Date = New Date(2004, 11, 29, 12, 0, 0)
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
L.deleteLogListByScheduleIdByCalendar(LAuthenticate, "S101h6f4ta10", _ SDate, EDate)
Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, all the log files are deleted for a specific schedule ID whose job start time falls within a specific range.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
GregorianCalendar STime = new GregorianCalendar(2004,Calendar.NOVEMBER,29,10,00); GregorianCalendar ETime = new GregorianCalendar(2004,Calendar.NOVEMBER,29,12,00);
L.deleteLogListByScheduleIdByCalendar(Authobj,"S101h6f4ta10", STime, ETime);
}
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: getLastLogByScheduleId
Purpose: Retrieves log information, the components of which are taken from the ReportCaster repository as identified by the specific schedule ID. This function returns only that instance of the log that has the most recent timestamp as represented by the startTime. This function is available to the administrator and the log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
The unique schedule identifier. |
String |
Output
Description |
Type |
---|---|
Log information. |
DsLog |
In the following example, the last log for a specific schedule ID is retrieved. The job ID, schedule ID, schedule description, job start time, job end time, and log messages are written to the RClastLogByScheduleId.txt file.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim log As LManager.DsLog Dim tempfile As String Dim newOutput As String Dim i As Integer
SecToken = RCLogon.logon("admin", "")
LAuthenticate.securityToken = SecToken
log = L.getLastLogByScheduleId(LAuthenticate, "S101h6f4ta10")
tempfile = "d:\RCtemp\RClastLogByScheduleId.txt" FileOpen(1, tempfile, OpenMode.Output)
newOutput = log.jobId + " " + _ log.scheduleId + " " + _ log.scheduleDescription + " " + _ log.startTime + " " + _ log.endTime
PrintLine(1, newOutput)
For i = 0 To log.logElementList.Length - 1 newOutput = log.logElementList(i).message PrintLine(1, newOutput)
Next i FileClose(1) Catch x As Exception MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message") End Try
In the following example, the last log for a specific schedule ID is retrieved. The job ID, schedule ID, schedule description, job start time, job end time, and log messages are written to the RClastLogByScheduleId.txt file.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
DsLog log = L.getLastLogByScheduleId(Authobj,"S101h6f4ta10");
File tempfile = new File("d:\\RCtemp\\RClastLogByScheduleId.txt"); FileOutputStream fos = new FileOutputStream(tempfile); PrintWriter out=new PrintWriter(fos); SimpleDateFormat sdf = new SimpleDateFormat();
String newOutput = log.getJobId() + " " + log.getScheduleId() + " " + log.getScheduleDescription() + " " + sdf.format(log.getStartTime().getTime()) + " " + sdf.format(log.getEndTime().getTime());
out.println(newOutput);
for ( int i=0; i<log.getLogElementList().length; i++ ) { newOutput = log.getLogElementList()[i].getMessage(); out.println(newOutput); }
out.close();
}
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: getLogByJobId
Purpose: Retrieves log information, the components of which are taken from the underlying ReportCaster repository as identified by the specified job ID. The job ID uniquely identifies a log record for a scheduled distribution in the repository. This function is available to the administrator and the log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
Job ID. Unique job identifier. |
String |
Output
Description |
Type |
---|---|
Log information. |
DsLog |
In the following example, the log for a specific job ID is retrieved. The job ID, schedule ID, schedule description, job start time, job end time, and log messages are written to the RClogByJobId.txt file.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim log As LManager.DsLog Dim tempfile As String Dim newOutput As String Dim i As Integer
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
log = L.getLogByJobId(LAuthenticate, "J1022pi3bm54")
tempfile = "d:\RCtemp\RClogByJobId.txt" FileOpen(1, tempfile, OpenMode.Output)
newOutput = log.jobId + " " + _ log.scheduleId + " " + _ log.scheduleDescription + " " + _ log.startTime + " " + _ log.endTime
PrintLine(1, newOutput)
For i = 0 To log.logElementList.Length - 1
newOutput = log.logElementList(i).message
PrintLine(1, newOutput)
Next i
FileClose(1)
Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, the log for a specific job ID is retrieved. The job ID, schedule ID, schedule description, job start time, job end time, and log messages are written to the RClogByJobId.txt file.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
DsLog log = L.getLogByJobId(Authobj,"J1022pi3bm54");
File tempfile = new File("d:\\RCtemp\\RClogByJobId.txt"); FileOutputStream fos = new FileOutputStream(tempfile); PrintWriter out=new PrintWriter(fos); SimpleDateFormat sdf = new SimpleDateFormat();
String newOutput = log.getJobId() + " " + log.getScheduleId() + " " + log.getScheduleDescription() + " " + sdf.format(log.getStartTime().getTime()) + " " + sdf.format(log.getEndTime().getTime()); out.println(newOutput);
for ( int i=0; i<log.getLogElementList().length; i++ ) { newOutput = log.getLogElementList()[i].getMessage(); out.println(newOutput); }
out.close();
}
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: getLogInfoListByOwner
Purpose: Retrieves a list of log information for a specific owner (for example, logs of all schedules run for a designated owner). The details for each log are not returned. This function is available to the administrator and the log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
Log owner. |
String |
Output
Description |
Type |
---|---|
List of partial log information. |
DsLog |
In the following example, a list of logs for a specific owner is retrieved. The job ID, schedule ID, schedule description, job start time, and job end time are written to the RClogList.txt file.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim logs() As LManager.DsLog Dim tempfile As String Dim newOutput As String Dim i As Integer
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
logs = L.getLogInfoListByOwner(LAuthenticate, "admin")
tempfile = "d:\RCtemp\RClogList.txt" FileOpen(1, tempfile, OpenMode.Output)
For i = 0 To logs.Length - 1 newOutput = logs(i).jobId + " " + _ logs(i).scheduleId + " " + _ logs(i).scheduleDescription + " " + _ logs(i).startTime + " " + _ logs(i).endTime PrintLine(1, newOutput)
Next i
FileClose(1) Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, a list of logs for a specific owner is retrieved. The job ID, schedule ID, schedule description, job start time, and job end time are written to the RClogList.txt file.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
DsLog[] logs = L.getLogInfoListByOwner(Authobj,"admin");
File tempfile = new File("d:\\RCtemp\\RClogList.txt"); FileOutputStream fos = new FileOutputStream(tempfile); PrintWriter out=new PrintWriter(fos); SimpleDateFormat sdf = new SimpleDateFormat();
for ( int i=0; i<logs.length; i++ ) { String newOutput = logs[i].getJobId() + " " + logs[i].getScheduleId() + " " + logs[i].getScheduleDescription() + " " + sdf.format(logs[i].getStartTime().getTime()) + " " + sdf.format(logs[i].getEndTime().getTime()); out.println(newOutput); }
out.close();
}
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: getLogInfoListByOwnerByCalendar
Purpose: Retrieves a list of log information for a specific owner (for example, logs of all schedule runs for a designated owner), where the jobs were run between a specific time interval (delineated by startTime and endTime). The details for each log are not returned. If startTime = NULL this retrieves all log records before endTime. If endTime = NULL this retrieves all log records after. This function is available to the administrator and the log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
Log owner. |
String |
Start time. |
Date |
End time. |
Date |
Output
Description |
Type |
List of partial log information. |
DsLog |
In the following example, a list of logs for a specific owner is retrieved. Only logs whose job start time fall between a specific date/time range will be retrieved. The job ID, schedule ID, schedule description, job start time, and job end time are written to the RClogListByOwnerByCalendar.txt file.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim logs() As LManager.DsLog Dim tempfile As String Dim newOutput As String Dim i As Integer Dim SDate As Date = New Date(2004, 11, 29, 10, 0, 0) Dim EDate As Date = New Date(2004, 11, 29, 12, 0, 0)
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
logs = L.getLogInfoListByOwnerByCalendar(LAuthenticate, "admin", _ SDate, EDate)
tempfile = "d:\RCtemp\RClogListByOwnerByCalendar.txt" FileOpen(1, tempfile, OpenMode.Output)
For i = 0 To logs.Length - 1 newOutput = logs(i).jobId + " " + _ logs(i).scheduleId + " " + _ logs(i).scheduleDescription + " " + _ logs(i).startTime + " " + _ logs(i).endTime PrintLine(1, newOutput) Next i
FileClose(1) Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, a list of logs for a specific owner is retrieved. Only logs whose job start time fall between a specific date/time range will be retrieved. The job ID, schedule ID, schedule description, job start time, and job end time are written to the RClogListByOwnerByCalendar.txt file.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
GregorianCalendar STime = new GregorianCalendar(2004,Calendar.NOVEMBER,29,10,00); GregorianCalendar ETime = new GregorianCalendar(2004,Calendar.NOVEMBER,29,12,00);
DsLog[] logs = L.getLogInfoListByOwnerByCalendar(Authobj,"admin", STime, ETime);
File tempfile = new File("d:\\RCtemp\\RClogListByOwnerByCalendar.txt"); FileOutputStream fos = new FileOutputStream(tempfile); PrintWriter out=new PrintWriter(fos); SimpleDateFormat sdf = new SimpleDateFormat();
for ( int i=0; i<logs.length; i++ ) { String newOutput = logs[i].getJobId() + " " + logs[i].getScheduleId() + " " + logs[i].getScheduleDescription() + " " + sdf.format(logs[i].getStartTime().getTime()) + " " + sdf.format(logs[i].getEndTime().getTime()); out.println(newOutput); }
out.close();
}
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: getLogInfoListByScheduleId
Purpose: Retrieves a list of log information for a specific schedule ID (for example, logs for all the runs of a designated schedule). The details for each log are not returned. This function is available to the administrator and the log owner only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
Schedule ID. Unique schedule identifier. |
String |
Output
Description |
Type |
---|---|
List of partial log information. |
DsLog |
In the following example, a list of logs for a specific schedule ID is retrieved. The job ID, schedule ID, schedule description, job start time, and job end time are written to the RClogListByScheduleId.txt file.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim logs() As LManager.DsLog Dim tempfile As String Dim newOutput As String Dim i As Integer
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
logs = L.getLogInfoListByScheduleId(LAuthenticate, "S101h6f4ta10")
tempfile = "d:\RCtemp\RClogListByScheduleId.txt" FileOpen(1, tempfile, OpenMode.Output)
For i = 0 To logs.Length - 1 newOutput = logs(i).jobId + " " + _ logs(i).scheduleId + " " + _ logs(i).scheduleDescription + " " + _ logs(i).startTime + " " + _ logs(i).endTime PrintLine(1, newOutput)
Next i
FileClose(1) Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, a list of logs for a specific schedule ID is retrieved. The job ID, schedule ID, schedule description, job start time, and job end time are written to the RClogListByScheduleId.txt file.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
DsLog[] logs = L.getLogInfoListByScheduleId(Authobj,"S101h6f4ta10");
File tempfile = new File("d:\\RCtemp\\RClogListByScheduleId.txt"); FileOutputStream fos = new FileOutputStream(tempfile); PrintWriter out=new PrintWriter(fos); SimpleDateFormat sdf = new SimpleDateFormat();
for ( int i=0; i<logs.length; i++ ) { String newOutput = logs[i].getJobId() + " " + logs[i].getScheduleId() + " " + logs[i].getScheduleDescription() + " " + sdf.format(logs[i].getStartTime().getTime()) + " " + sdf.format(logs[i].getEndTime().getTime()); out.println(newOutput); }
out.close();
}
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
Function Name: getOwnerList
Purpose: Retrieves the schedule owner list from the ReportCaster repository. The owner list contains the user names of individuals who have created schedules or have the right to create schedules in ReportCaster. This function is available to the administrator only.
Input
Description |
Type |
---|---|
Authentication information. |
Authenticate |
Output
Description |
Type |
---|---|
List of schedule owners. |
String |
In the following example, a list of owners for the produced schedule logs is retrieved. The owners list is written to the RCownerList.txt file.
Try Dim RCLogon As New LogonManager.LogonManagerWSService Dim L As New LManager.LogManagerWSService Dim SecToken As String Dim LAuthenticate As New LManager.Authenticate Dim Owners() As String Dim tempfile As String Dim newOutput As String Dim i As Integer
SecToken = RCLogon.logon("admin", "") LAuthenticate.securityToken = SecToken
Owners = L.getOwnerList(LAuthenticate)
tempfile = "d:\RCtemp\RCownerList.txt" FileOpen(1, tempfile, OpenMode.Output)
For i = 0 To Owners.Length - 1 newOutput = Owners(i) PrintLine(1, newOutput) Next i
FileClose(1)
Catch x As Exception
MsgBox(x.Message, MsgBoxStyle.OKOnly, "Error Message")
End Try
In the following example, a list of owners for the produced schedule logs is retrieved. The owners list is written to the RCownerList.txt file.
try { LogonManagerWSService LogonService = new LogonManagerWSServiceLocator(); LogonManagerWS RCLogon = LogonService.getLogonService();
LogManagerWSService LService = new LogManagerWSServiceLocator(); LogManagerWS L = LService.getLogService();
String sectoken = RCLogon.logon("admin",""); Authenticate Authobj = new Authenticate(); Authobj.setSecurityToken(sectoken);
String[] owners = L.getOwnerList(Authobj);
File tempfile = new File("d:\\RCtemp\\RCownerList.txt"); FileOutputStream fos = new FileOutputStream(tempfile); PrintWriter out=new PrintWriter(fos);
for ( int i=0; i<owners.length; i++ ) { String newOutput = owners[i]; out.println(newOutput); }
out.close();
}
catch (Throwable t) { System.err.println(t); t.printStackTrace(); System.exit(1); }
WebFOCUS |