executeReport
This function runs an existing report, using its report_id. This is obtained from the get_reports function.
Input
Class |
Name |
Type |
Required |
Details |
ExecuteReportRequest |
userId |
String |
Yes |
The caller’s user name |
ExecuteReportRequest |
password |
String |
Yes |
The caller’s password |
ExecuteReportRequest |
status |
String |
No |
The status of the items being collected |
ExecuteReportRequest |
pageLength |
Integer |
Yes |
The page length |
ExecuteReportRequest |
persistHandle |
String |
No |
A random string to persist the data |
ExecuteReportRequest |
recordStart |
Integer |
No |
The starting index of records returned |
ExecuteReportRequest |
recordCount |
Integer |
No |
The count of records being fetched |
ExecuteReportRequest |
returnRawXML |
boolean |
No |
Determines whether raw XML will be returned with the parse fields. This should be set to false for better performance |
Output
Class |
Name |
Type |
Required |
Details |
ExecuteReportResponse |
success |
boolean |
Yes |
True is succeeded False if failed |
ExecuteReportResponse |
returnCode |
String |
No |
See Appendix for details |
ExecuteReportResponse |
returnMessage |
String |
No |
Human readable message |
ExecuteReportResponse |
xmlResults |
String |
No |
The search results in XML format |
ExecuteReportResponse |
itemRecords |
Array[] |
Yes |
An array of ItemRecord objects |
ItemRecord |
numberOfItemRecordFields |
int |
Yes |
The number of field records in the child array |
ItemRecord |
itemRecordFields |
Array[] |
Yes |
An array of ItemRecordField objects |
ItemRecordField |
fieldId |
String |
Yes |
The id of the field |
ItemRecordField |
fieldTitle |
String |
Yes |
The title of the field |
ItemRecordField |
fieldValue |
String |
Yes |
The value of the field |
ItemRecordField |
row |
int |
Yes |
The repeating row value |
Example
public static void testExecuteReport(EVReportServiceStub stub) {
try {
ExecuteReportDocument reqEnvelope = ExecuteReportDocument.Factory.newInstance();
ExecuteReportRequest request = reqEnvelope.addNewExecuteReport().addNewRequest();
request.setUserId(ServiceClientHelper.ADMIN_USER_ID);
request.setPassword(ServiceClientHelper.ADMIN_PASSWORD);
request.setPageLength(100);
request.setRecordStart(1);
request.setRecordCount(120);
request.setPersistHandle(ServiceClientHelper.randStr);
request.setReportId(ServiceClientHelper.STANDARD_REPORT);
ExecuteReportResponseDocument resEnvelope = stub.executeReport(reqEnvelope);
ExecuteReportResponse response = resEnvelope.getExecuteReportResponse().getReturn();
if (response.getSuccess()) {
System.out.println("success: [" + response.getReturnCode() + "] : " +
response.getReturnMessage());
} else {
System.out.println("failure: [" + response.getReturnCode() + "] : " +
response.getReturnMessage());
}
} catch (Exception e) {
e.printStackTrace();
System.err.println("nnn");
}
}