These report web services allows user to generate a report in a different format.
This function returns a specified report in the XLS or XLSX format (Excel spreadsheet).
Request Elements
The following elements will be passed with this request:
Request Element | Data Type | Description |
---|---|---|
LoginId | String | Yellowfin web services administrator user Id. This can be the user ID or the email address, depending on the Logon ID method. This Yellowfin account must have the “web services” role enabled, and must belong to the Default (i.e. Primary) Org. |
Password | String | Password of the above account. |
OrgId | Integer | Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1. |
ReportRequest | String | Web services function. Set this to "XLSX" or ""XLS". |
ReportId | Integer | An internal ID to specify the report to be returned in XLSX/XLS form. |
Request Example
The following SOAP example shows the parameters that you can pass to this call:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/"> <soapenv:Header/> <soapenv:Body> <web:remoteReportCall> <arg0> <loginId>admin@yellowfin.com.au</loginId> <password>test</password> <orgId>1</orgId> <reportRequest>XLSX</reportRequest> <reportId>56401</reportId> </arg0> </web:remoteReportCall> </soapenv:Body> </soapenv:Envelope>
Response Elements
The response returned will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
ReportId | Integer | ID of the specified report. |
ReportName | String | Name of the specified report. |
HitCount | Integer | Number of times the specified report has been accessed. |
FormatCode | String | Format code of the specified report. |
BinaryData | String | Report data as Base64 encoded binary chunk of XLSX. |
ContentType | String | MIME Content Type of this object. Value will be “application/vnd.openxmlformats-officedocument.spreadsheetml.sheet” |
Response Example
The service will return the below response, according to our SOAP example:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/"> <return> <author>System Administrator</author> <authoringMode>JAVA</authoringMode> <averageRunTime>0</averageRunTime> <binaryData>UEsDBBQACAgIAJUKa0wAAAAAAAAAAAAAAAALAAAAX3JlbHMvLnJlb ...</binaryData> <canDrill>false</canDrill> <category>Audit Reports</category> <contentType>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</contentType> <dashboardEnabled>true</dashboardEnabled> <dataOutput>COLUMN</dataOutput> <datasource>Yellowfin Configuration Database</datasource> <errorCode>0</errorCode> <formatCode>REPORTANDCHART</formatCode> <hitCount>25</hitCount> <lastModifiedDate>2016-03-29</lastModifiedDate> <lastRunDuration>0</lastRunDuration> <lastRunStatus>RUN_NOERROR</lastRunStatus> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 56401 Successfully</messages> <messages>Generating XLS Report</messages> <messages>Request Contains No ReportFilter Records.</messages> <messages>Report Run Successfully</messages> <messages>Web Service Request Complete</messages> <preRunFilterString><![CDATA[<div class="rptFilterLogicText"> <span class="rptFilterLogicIdentifier">Active Session Start</span> Is Not Null <span class="rptFilterLogicIdentifier"></span> </div>]]></preRunFilterString> <private>false</private> <reportDescription/> <reportId>56401</reportId> <reportName>Active Sessions</reportName> <reportTemplate>REPORTANDCHART</reportTemplate> <reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID> <reportUsage>26</reportUsage> <sessionId>18097e8275689f88876f004a07935a7c</sessionId> <statusCode>SUCCESS</statusCode> <subCategory>Admin Reports</subCategory> <tags>No tags</tags> <viewName>NEW VIEW</viewName> </return> </ns2:remoteReportCallResponse> </S:Body> </S:Envelope>
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Here's a basic request to perform this call, which includes logging in as the admin user and specifying the web service call to perform:
ReportServiceRequest rsr = new ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setReportRequest("XLSX");
If you need to specify the client org where the report exists, add this to your code:
rsr.setOrgRef("org1"); // search for the report in this client org
Specify which report to convert into XLSX format:
rsr.setReportId(60712);
Once the request is configured, carry out the call:
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
Initialize the Report web service. Click here to learn how to do this.
The response returned will contain the parameters including, StatusCode, ReportID, BinaryData, etc. (See the Response Parameters table above for more details.)
Complete Example
Below is a full example of this function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_xlsxreport.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user to add details according to your environment.
- Run http://<host>:<port>/ws_xlsxreport.jsp from your Internet browser.
/* ws_xlsxreport.jsp */ <%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page import="com.hof.util.*, java.util.*, java.text.*" %> <%@ page import="com.hof.web.form.*" %> <%@ page import="com.hof.mi.web.service.*" %> <%@ page import="javax.xml.bind.JAXBContext" %> <%@ page import="javax.xml.bind.Marshaller" %> <%@ page import="java.io.StringWriter" %> <%@ page import="javax.xml.bind.JAXBElement" %> <%@ page import="javax.xml.namespace.QName" %> <% /* Create Group Using Java generated stubs rather that using the Yellowfin webservices API.. */ ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService"); ReportServiceRequest rsr = new ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setReportRequest("XLSX"); rsr.setOrgRef("1"); rsr.setReportId(60712); rsr.setReportClientReferenceId("1"); ReportServiceResponse rs=rsc.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs); m.marshal(rootElement,out); //out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
This function returns a specified report in the DOC or DOCX form (Microsoft Word).
Request Elements
The following elements will be passed with this request:
Request Element | Data Type | Description |
---|---|---|
LoginId | String | Yellowfin web services administrator user Id. This can be the user ID or the email address, depending on the Logon ID method. This Yellowfin account must have the “web services” role enabled, and must belong to the Default (i.e. Primary) Org. |
Password | String | Password of the above account. |
OrgId | Integer | Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1. |
ReportRequest | String | Web services function. Set this to "DOCX" or "DOC". |
ReportId | Integer | An internal ID to specify the report to be returned in DOCX/DOC form. |
Request Example
The following SOAP example shows the parameters that you can pass to this call:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/"> <soapenv:Header/> <soapenv:Body> <web:remoteReportCall> <arg0> <loginId>admin@yellowfin.com.au</loginId> <password>test</password> <orgId>1</orgId> <reportRequest>DOCX</reportRequest> <reportId>56401</reportId> </arg0> </web:remoteReportCall> </soapenv:Body> </soapenv:Envelope>
Response Elements
The response returned will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
ReportId | Integer | ID of the specified report. |
ReportName | String | Name of the specified report. |
HitCount | Integer | Number of times the specified report has been accessed. |
FormatCode | String | Format code of the specified report. |
BinaryData | String | Report data as Base64 encoded binary chunk of DOCX. |
ContentType | String | MIME Content Type of this object. Value will be “application/vnd.openxmlformats-officedocument.wordprocessingml.document” |
Response Example
The service will return the below response, according to our SOAP example:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/"> <return> <author>System Administrator</author> <authoringMode>JAVA</authoringMode> <averageRunTime>0</averageRunTime> <binaryData>UEsDBBQACAgIAN0Ma0wAAAAAAAAAAAAAAAATAAAAW0 ...</binaryData> <canDrill>false</canDrill> <category>Audit Reports</category> <contentType>application/vnd.openxmlformats-officedocument.wordprocessingml.document</contentType> <dashboardEnabled>true</dashboardEnabled> <dataOutput>COLUMN</dataOutput> <datasource>Yellowfin Configuration Database</datasource> <errorCode>0</errorCode> <formatCode>REPORTANDCHART</formatCode> <hitCount>26</hitCount> <lastModifiedDate>2016-03-29</lastModifiedDate> <lastRunDuration>0</lastRunDuration> <lastRunStatus>RUN_NOERROR</lastRunStatus> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 56401 Successfully</messages> <messages>Generating DOCX Report</messages> <messages>Request Contains No ReportFilter Records.</messages> <messages>Report Run Successfully</messages> <messages>Web Service Request Complete</messages> <preRunFilterString><![CDATA[<div class="rptFilterLogicText"> <span class="rptFilterLogicIdentifier">Active Session Start</span> Is Not Null <span class="rptFilterLogicIdentifier"></span> </div>]]></preRunFilterString> <private>false</private> <reportDescription/> <reportId>56401</reportId> <reportName>Active Sessions</reportName> <reportTemplate>REPORTANDCHART</reportTemplate> <reportUUID>594d4da4-1b58-44d3-bf4f-11456a42f68c</reportUUID> <reportUsage>27</reportUsage> <sessionId>9b4a5e7182d359795d176d56378ac0f2</sessionId> <statusCode>SUCCESS</statusCode> <subCategory>Admin Reports</subCategory> <tags>No tags</tags> <viewName>NEW VIEW</viewName> </return> </ns2:remoteReportCallResponse> </S:Body> </S:Envelope>
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Here's a basic request to perform this call, which includes logging in as the admin user and specifying the web service call to perform:
ReportServiceRequest rsr = new ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setReportRequest("DOCX");
If you need to specify the client org where the report exists, add this to your code:
rsr.setOrgRef("org1"); // search for the report in this client org
Specify which report to convert into DOCX format:
rsr.setReportId(60712);
Once the request is configured, carry out the call:
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
Initialize the Report web service. Click here to learn how to do this.
The response returned will contain the parameters including, StatusCode, ReportID, BinaryData, etc. (See the Response Parameters table above for more details.)
Complete Example
Below is a full example of this function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_docxreport.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user to add details according to your environment.
- Run http://<host>:<port>/ws_docxreport.jsp from your Internet browser.
/* ws_docxreport.jsp */ <%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page import="com.hof.util.*, java.util.*, java.text.*" %> <%@ page import="com.hof.web.form.*" %> <%@ page import="com.hof.mi.web.service.*" %> <%@ page import="javax.xml.bind.JAXBContext" %> <%@ page import="javax.xml.bind.Marshaller" %> <%@ page import="java.io.StringWriter" %> <%@ page import="javax.xml.bind.JAXBElement" %> <%@ page import="javax.xml.namespace.QName" %> <% ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService"); ReportServiceRequest rsr = new ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setReportRequest("DOCX"); rsr.setOrgRef("1"); rsr.setReportId(60712); rsr.setReportClientReferenceId("1"); ReportServiceResponse rs=rsc.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs); m.marshal(rootElement,out); //out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>
This function returns a specified report in a printable format, instead of the default format.
Request Elements
The following elements will be passed with this request:
Request Element | Data Type | Description |
---|---|---|
LoginId | String | Yellowfin web services administrator user Id. This can be the user ID or the email address, depending on the Logon ID method. This Yellowfin account must have the “web services” role enabled, and must belong to the Default (i.e. Primary) Org. |
Password | String | Password of the above account. |
OrgId | Integer | Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1. |
ReportRequest | String | Web services function. Set this to "PRINT". |
ReportId | Integer | An internal ID to specify the report that is to be returned in a printable format. |
Request Example
The following SOAP example shows the parameters that you can pass to this call:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/"> <soapenv:Header/> <soapenv:Body> <web:remoteReportCall> <arg0> <loginId>admin@yellowfin.com.au</loginId> <password>test</password> <orgId>1</orgId> <reportRequest>PRINT</reportRequest> <reportId>60712</reportId> </arg0> </web:remoteReportCall> </soapenv:Body> </soapenv:Envelope>
Response Elements
The response returned will contain these parameters:
Response Element | Data Type | Description | Retrieval Code |
---|---|---|---|
Chart | Array (ReportChart) | Array of ReportChart objects that contains multiple chart bitmaps when attached to a HTML report response (see ReportChart) |
|
ReportBinaryObject | Array (ReportBinaryObject) | Array of ReportBinaryObject objects that contain BLOBs and CLOBs (see ReportBinaryObject) |
|
ReportStyles | String | CSS styles |
|
Breadcrumbs | Array (Breadcrumb) | Array of Breadcrumb objects |
|
SeriesSelection | Array (SeriesSelection) | Array of SeriesSelection objects |
|
TimeAggregationSelection | Array (TimeAggregationSelection) | Array of TimeAggregationSelection objects |
|
ReportTabSelection | Array (ReportTabSelection) | Array of ReportTabSelection objects |
|
ReportPageSelection | Array (ReportPageSelection) | Array of ReportPageSelection objects |
|
TimeSliderSelection | Array (TimeSliderSelection) | Array of TimeSliderSelection objects |
|
SortableColumns | Array (SortableTableColumn) | Array of SortableTableColumn objects |
|
SelectedSortColumn | Integer | Column used for sorting. The index here applies to the column index within the report |
|
SelectedSortOrder | Integer | The sort order of the column used for sorting (0 for ascending and 1 for descending) |
|
DrillCode | String | Drill type if available on the report |
|
RelatedReports | Array (RelatedReport) | Array of RelatedReport objects. These are reports that are tabbed/codisplayed to the main report |
|
BinaryData | String | Base64 encoded binary chunk of the HTML document |
|
Private |
| Determines if the report is a private or a public one |
|
ContentType | String | MIME ContentType of the returned object. Value will be “text/html” |
|
CanDrill | Boolean | If the report is able to drill or not |
|
GoogleMaps | Array (GMap) | Array of GMap objects |
|
Response Example
The service will return the below response, according to our SOAP example:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:remoteReportCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/"> <return> <author>System Administrator</author> <authoringMode>JAVA</authoringMode> <averageRunTime>0</averageRunTime> <binaryData>PHN0eWxlIHR50iRlNfaW1hZ2VzX3Byb2Nlc ... </binaryData> <canDrill>false</canDrill> <category>Tutorial</category> <charts> <contentType>image/gif</contentType> <data>R0lGODlhFAAUAJEAAP///43S/jSz/wAAACH5BAAHAP8ALAAAAAAUABQAAAJClI+pwe3fDJxP0msZ AJNH4WyQ+IVes51BFpBa6rBu6q4g6tG1nOvx/cLBSjjTDthSJVW8ERNZQ/0uGCR1eoUottwCADs=</data> <filename>FS_images_process_mini_rwd_off_gif</filename> <reportIndex>FS_images_process_mini_rwd_off_gif</reportIndex> </charts> <charts> <contentType>image/gif</contentType> <data>R0lGODlhFAAUAJEAAP///43S/jSz/wAAACH5BAAHAP8ALAAAAAAUABQAAAI5lI+pwe3fDJxP0msv gHmCXQnax4neBzpdg5Ih1Lqq6cRpRNdtSe1vL8NdAkHGCsYbTo7KAFOpiEoLADs=</data> <filename>FS_images_process_mini_previous_off_gif</filename> <reportIndex>FS_images_process_mini_previous_off_gif</reportIndex> </charts> <charts> <contentType>image/gif</contentType> <data>R0lGODlhFAAUAOYAAP///2PF/2HE/2DD/13B ...</data> <filename>FS_images_process_mini_next_gif</filename> <reportIndex>FS_images_process_mini_next_gif</reportIndex> </charts> <charts> <contentType>image/gif</contentType> <data>R0lGODlhFAAUAOYAAP///2PF/2HE/2DD/13B/ ...</data> <filename>FS_images_process_mini_ff_gif</filename> <reportIndex>FS_images_process_mini_ff_gif</reportIndex> </charts> <charts> <contentType>image/gif</contentType> <data>R0lGODlhBwAEAIABABo/V////yH5BAEAAAEALAAAAAAHAAQAAAIIhA+BGWoNWSgAOw==</data> <filename>FS_images_rpt_dd_menu_on_gif</filename> <reportIndex>FS_images_rpt_dd_menu_on_gif</reportIndex> </charts> <charts> <contentType>image/gif</contentType> <data>R0lGODlhBwAEAIABAP///////yH5BAEAAAEALAAAAAAHAAQAAAIHjGEJq8sOCwA7</data> <filename>FS_images_rpt_dd_active_up_gif</filename> <reportIndex>FS_images_rpt_dd_active_up_gif</reportIndex> </charts> <charts> <contentType>image/png</contentType> <data>iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAYA9Hlb3O9MIAAAAASUVORK5CYII=</data> <filename>img0-60712-60718-0</filename> <reportIndex>img0-60712-60718-0</reportIndex> </charts> <contentType>text/html</contentType> <dashboardEnabled>true</dashboardEnabled> <dataOutput>COLUMN</dataOutput> <datasource>Ski Team</datasource> <drillCode>NODRILL</drillCode> <errorCode>0</errorCode> <formatCode>REPORTANDCHART</formatCode> <hitCount>0</hitCount> <lastModifiedDate>2017-06-26</lastModifiedDate> <lastRunStatus>RUN_NOERROR</lastRunStatus> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Loaded Report: 60712 Successfully</messages> <messages>Generating HTML Report</messages> <messages>Request Contains No ReportFilter Records.</messages> <messages>AGENCYNAME (FilterId: 60723 ) Requires User Prompt</messages> <messages>Report Run Successfully</messages> <messages>Web Service Request Complete</messages> <preRunFilterString><![CDATA[<div class="rptFilterLogicText"> <span class="rptFilterLogicIdentifier">Company Name</span> In List <span class="rptFilterLogicIdentifier">[User Prompt]</span> </div>]]></preRunFilterString> <private>false</private> <relatedReports/> <reportDescription>Top N Agencies compared to all other Agencies by demographic</reportDescription> <reportId>60712</reportId> <reportName>Agency Benchmark</reportName> <reportPageSelection> <hyperLink>PAGE|60712|ABS|0</hyperLink> <pageTitle>1 - 100</pageTitle> <reportId>60712</reportId> <selected>true</selected> </reportPageSelection> <reportPageSelection> <hyperLink>PAGE|60712|ABS|100</hyperLink> <pageTitle>101 - 160</pageTitle> <reportId>60712</reportId> <selected>false</selected> </reportPageSelection> <reportStyle>td.rpthdrcol { position: relative; } img.rptcolmenu { position: absolute; right: 5px; top: 0; bottom: 0; margin: auto 0; cursor: pointer; } td.rpthdrcol div.rptdata { padding-right: 20px; } td.reportChartCell { vertical-align: top; } div.reportChart { position: relative; display: inline-block; } . . . </reportStyle> <reportTemplate>REPORTANDCHART</reportTemplate> <reportUUID>c83357db-8aef-4ec7-ab72-fce34de9ee77</reportUUID> <reportUsage>0</reportUsage> <selectedSortColumn>-1</selectedSortColumn> <selectedSortOrder>1</selectedSortOrder> <sessionId>99ba02f7d8e0590185d7097c2e2f551a</sessionId> <sortableColumns/> <sortableColumns/> <sortableColumns/> <sortableColumns/> <statusCode>SUCCESS</statusCode> <subCategory>Marketing & Booking</subCategory> <tags>No tags</tags> <viewName>New View</viewName> </return> </ns2:remoteReportCallResponse> </S:Body> </S:Envelope>
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Here's a basic request to perform this call, which includes logging in as the admin user and specifying the web service call to perform:
ReportServiceRequest rsr = new ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setReportRequest("XLSX");
If you need to specify the client org where the report exists, add this to your code:
rsr.setOrgRef("org1"); // search for the report in this client org
Specify which report to convert into XLSX format:
rsr.setReportId(60712);
Once the request is configured, carry out the call:
ReportServiceResponse rs=rsc.remoteReportCall(rsr);
Initialize the Report web service. Click here to learn how to do this.
The response returned will contain the parameters including, StatusCode, ReportID, BinaryData, etc. (See the Response Parameters table above for more details.)
Complete Example
Below is a full example of this function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_xlsxreport.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user to add details according to your environment.
- Run http://<host>:<port>/ws_xlsxreport.jsp from your Internet browser.
/* ws_xlsxreport.jsp */ <%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ page import="com.hof.util.*, java.util.*, java.text.*" %> <%@ page import="com.hof.web.form.*" %> <%@ page import="com.hof.mi.web.service.*" %> <%@ page import="javax.xml.bind.JAXBContext" %> <%@ page import="javax.xml.bind.Marshaller" %> <%@ page import="java.io.StringWriter" %> <%@ page import="javax.xml.bind.JAXBElement" %> <%@ page import="javax.xml.namespace.QName" %> <% /* Create Group Using Java generated stubs rather that using the Yellowfin webservices API.. */ ReportService rsc = new ReportService(); //("localhost", 8080, "admin@yellowfin.com.au", "test", "/services/ReportService"); ReportServiceRequest rsr = new ReportServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setReportRequest("XLSX"); rsr.setOrgRef("1"); rsr.setReportId(60712); rsr.setReportClientReferenceId("1"); ReportServiceResponse rs=rsc.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); // To format XML JAXBElement<ReportServiceResponse> rootElement = new JAXBElement<ReportServiceResponse>(new QName("ReportServiceResponse"), ReportServiceResponse.class, rs); m.marshal(rootElement,out); //out.write("Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode()); } %>