The following web services can be used to configure Yellowfin.
This web service will update Yellowfin's configuration details. It updates the ConfigTypeCode column in the Configuration table of the Yellowfin database with 'SYSTEM'.
Updates Configuration table of Yellowfin database with “SYSTEM” in ConfigTypeCode column. These parameters are those ones which you apply on Configuration page of default org. This service can update the table; however, the changes will not affect Yellowfin until Yellowfin restart.
Request Parameters
The following parameters should be passed with this request:
Request Element | Data Type | Description |
---|---|---|
LoginId | String | An admin account to connect to Yellowfin web services. This can be the user ID or the email address, depending on the Logon ID method. This 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. |
Function | String | Web service function. Set this to "SAVECONFIGURATION". |
Parameters | String[] | Array of strings. This parameter is used to pass the configuration settings. The first string should be the content for configCode, and the second is for configData of Configuration table. |
Client | AdministrationClientOrg | This optional parameter is used to specify a particular client organization. However, if one is not provided, then the default org. will be used. It must be noted, however, that the majority of configuration settings are global and cannot be set up for a particular client. |
Request Example
Below is a SOAP XML example for this request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices.web.mi.hof.com/"> <soapenv:Header/> <soapenv:Body> <web:remoteAdministrationCall> <arg0> <loginId>admin@yellowfin.com.au</loginId> <password>test</password> <orgId>1</orgId> <function>LISTDATASOURCES</function> </arg0> </web:remoteAdministrationCall> </soapenv:Body> </soapenv:Envelope>
Response Parameters
The returned response will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
DataSources | AdministrationDataSource[] | Object array containing all available data sources. |
Response Example
The service will return the below response, according to our SOAP example:
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Define the request for this function, which includes logging in as the admin user and specifying the web service call to perform:
AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setFunction("LISTDATASOURCES");
Provide the new licence for your instance. The licence will be a byte array; you can encode it to Base64 and use the util method to convert it.
byte[] lic = com.hof.util.Base64.decode("Base64 Encoded String of licence file"); rsr.setBinaryData(lic);
Once the request is configured, perform the call:
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
Initialize the Administration web service. Click here to learn how to do this.
The response will contain the StatusCode. (See details in the Response Parameters table above.)
Complete Example
Below is a full example of this web service call. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_listdatasources .jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, and admin user details according to your environment.
- Run http://<host>:<port>/ws_listdatasources.jsp from your Internet browser.
<% /* ws_listdatasources.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.*" %> <% AdministrationServiceResponse rs = null; AdministrationServiceRequest rsr = new AdministrationServiceRequest(); AdministrationServiceService ts = new AdministrationServiceServiceLocator("localhost", 8080, "/services/AdministrationService", false); AdministrationServiceSoapBindingStub rssbs = (AdministrationServiceSoapBindingStub) ts.getAdministrationService(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(new Integer(1)); rsr.setFunction("LISTDATASOURCES"); rs = rssbs.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode())) { out.write("<table>"); out.write("<tr>"); out.write("<th>Source ID</th><th>Source Name</th>"); out.write("</tr>"); for (AdministrationDataSource administrationDataSource: rs.getDatasources()) { out.write("<tr>"); out.write("<td>" + administrationDataSource.getSourceId() + "</td><td>" + administrationDataSource.getSourceName() + "</td>"); out.write("</tr>"); } out.write("</table>"); } else { out.write(rs.getStatusCode()); out.write(rs.toString()); } %>