Page History
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This request runs a specified report and returns it in its Text form.
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response will contain these main parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
Anchor | rtf | rtf |
---|
RTF is not working prob. both the jsp and soap display a message saying: Unknown Or Unsupported Request: RTF.
...
title | RTF |
---|
This request runs a specified report and returns it in its RTF form.
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 "RTF".
...
Request Example
The following SOAP example shows the parameters that you can pass to this call:
Code Block | ||
---|---|---|
| ||
<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>RTF</reportRequest>
<reportId>60712</reportId>
</arg0>
</web:remoteReportCall>
</soapenv:Body>
</soapenv:Envelope> |
Response Elements
The response will contain these main parameters:
...
Response Element
...
Data Type
...
Description
...
Retrieval Code
...
ReportId
...
Integer
...
ID of the specified report.
...
getReportId()
...
ReportName
...
String
...
Name of the specified report.
...
getReportName()
...
HitCount
...
Integer
...
Number of times the specified report has been accessed.
...
getHitCount()
...
FormatCode
...
String
...
Format code of the specified report.
...
getFormatCode()
...
BinaryData
...
String
...
Base64 encoded binary chunk of RTF.
...
getBinaryData()
...
ContentType
...
String
...
MIME Content Type of this object. Value will be “application/rtf”.
...
getContentType()
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
...
title | Step-by-step instructions |
---|
...
Code Block | ||
---|---|---|
| ||
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("RTF"); |
...
Code Block | ||
---|---|---|
| ||
rsr.setOrgRef("org1"); // search for the report in this client org |
...
Code Block | ||
---|---|---|
| ||
rsr.setReportId(60712); |
...
Code Block | ||
---|---|---|
| ||
ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
Initialize the Report web service. Click here to learn how to do this.
...
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_rtfreport.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_rtfreport.jsp from your Internet browser.
Code Block | ||||
---|---|---|---|---|
| ||||
/* ws_rtfreport.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("RTF");
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());
}
%>
|
Anchor | |||
---|---|---|---|
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The web service returns a report in a printable format rather than the default.
Request ElementsThe following elements will be passed with this request:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Response ElementsThe response will contain these main parameters:
Response ExampleThe service will return the below response, according to our SOAP example:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
Complete ExampleBelow is a full example of this function. To use it for yourself, carry out the following the steps:
|
...