Page History
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This web service returns schematic information of a specified report, which includes metadata for report columns and filters. A report needs to be specified by either providing its ID or by its web service name.
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 returned will contain these main parameters:
The service ReportSchema object will return the below response, according to our SOAP example:the following parameters containing information on the report column.
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:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example: Expand | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Code Block | ||
---|---|---|
| ||
ReportServiceRequest rsr = new ReportServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(new Integer(1));
rsr.setReportRequest("INFO"); |
Code Block | ||
---|---|---|
| ||
rsr.setOrgRef("org1"); // search for the report in this client org |
Code Block | ||
---|---|---|
| ||
rsr.setReportId(60712); |
Code Block | ||
---|---|---|
| ||
rsr.setReportClientReferenceId("1");
rsr.setSessionId("18607a5670842650d512976b5d7ccddd"); |
Code Block | ||
---|---|---|
| ||
ReportServiceResponse rs=rsc.remoteReportCall(rsr); |
Initialize the Report web service. Click here to learn how to do this.
The response returned will contain the StatusCode parameter, along with other report specific parameters. Refer to the Response Parameter table above for 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_reportschema.jsp.
- Put the file in the root folder, which is Yellowfin/appserver/webapps/ROOT.
- Adjust host, port, and admin user details according to your environment.
- Run http://<host>:<port>/ws_reportschema.jsp from your Internet browser.
Code Block | ||||
---|---|---|---|---|
| ||||
<% */ %> <%@ 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.*" %> <% ReportServiceResponse rs = null; ReportServiceRequest rsr = new ReportServiceRequest(); ReportServiceService ts = new ReportServiceServiceLocator("localhost", 8080, "/services/ReportService", false); ReportServiceSoapBindingStub rssbs = (ReportServiceSoapBindingStub) ts.getReportService(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setReportRequest("SCHEMA"); rsr.setReportId(70045); rs = rssbs.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { out.write("Success </br>"); ReportSchema[] schema = rs.getColumns(); for (ReportSchema s: schema) //display filters: if (s.getFilterType() != null && s.getFilterTypeCode().equals("FILTER")){ /* ws_reportschema.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.setOrgRef("1"); rsr.setReportRequest("SCHEMA"); rsr.setReportId(60712); rsr.setReportClientReferenceId("1"); ReportServiceResponse rs=rsc.remoteReportCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { JAXBContext context = JAXBContext.newInstance(ReportServiceResponse.class); out.write("<br>Display Name: " + s.getDisplayName()); out.write("<br>Filter UUID:" + s.getFilterUUID()); out.write("<br>Filter Id:" + s.getFilterId()); 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"(rs.getStatusCode()); out.write(" Code: " + rs.getErrorCodetoString()); } %> |
Report Result Set Functions
...