Like what you see? Have a play with our trial version.

Error rendering macro 'rw-search'

null

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

The web services listed in this section are used to manage data sources.

 

 

This web service retrieves a list of all those data sources that are available to the authenticated user and client org. The response will contain an array of an AdministrationDataSource object with the source ID and source name for each data source that has been found.

 

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 "LISTDATASOURCES".

  

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:

  • SUCCESS
  • FAILURE
DataSourcesAdministrationDataSource[]Object array containing all available data sources.

 

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:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <datasources>
               <accessLevelCode>UNSECURE</accessLevelCode>
               <connectionDriver>org.hsqldb.jdbcDriver</connectionDriver>
               <connectionPath/>
               <connectionString>jdbc:hsqldb:file:/Applications/Yellowfin 7.4 86/tutorialdata/newskiteam;shutdown=true</connectionString>
               <connectionTimeout>180</connectionTimeout>
               <connectionType>JDBC</connectionType>
               <connectionTypeCode>GENERICUSER</connectionTypeCode>
               <inheritChildSourceFilters>false</inheritChildSourceFilters>
               <maxRows>10000</maxRows>
               <maxmimumConnections>5</maxmimumConnections>
               <minimumConnections>1</minimumConnections>
               <refreshTime>3</refreshTime>
               <sourceDescription>Ski Team is the demonstration and tutorial database.</sourceDescription>
               <sourceId>54700</sourceId>
               <sourceName>Ski Team</sourceName>
               <sourceType>HSQLDB</sourceType>
               <timezone>AUSTRALIA/SYDNEY</timezone>
               <userName>SA</userName>
               <userPassword>cDahEHuTOrk=</userPassword>
            </datasources>
            <datasources>
               <accessLevelCode>UNSECURE</accessLevelCode>
               <connectionDriver>org.hsqldb.jdbcDriver</connectionDriver>
               <connectionString>jdbc:hsqldb:file:/Applications/Yellowfin 7.4 86/data/configdb;shutdown=true</connectionString>
               <connectionTimeout>180</connectionTimeout>
               <connectionType>JDBC</connectionType>
               <connectionTypeCode>GENERICUSER</connectionTypeCode>
               <inheritChildSourceFilters>false</inheritChildSourceFilters>
               <maxRows>10000</maxRows>
               <maxmimumConnections>5</maxmimumConnections>
               <minimumConnections>1</minimumConnections>
               <refreshTime>3</refreshTime>
               <sourceDescription/>
               <sourceId>54701</sourceId>
               <sourceName>Yellowfin Configuration Database</sourceName>
               <sourceType>GENERICJDBC</sourceType>
               <timezone>AUSTRALIA/SYDNEY</timezone>
               <userName>SA</userName>
               <userPassword>cDahEHuTOrk=</userPassword>
            </datasources>
            <datasources>
               <accessLevelCode>UNSECURE</accessLevelCode>
               <connectionDriver>net.sourceforge.jtds.jdbc.Driver</connectionDriver>
               <connectionPath/>
               <connectionString>jdbc:jtds:sqlserver://:1433/</connectionString>
               <connectionTimeout>180</connectionTimeout>
               <connectionType>JDBC</connectionType>
               <connectionTypeCode>GENERICUSER</connectionTypeCode>
               <inheritChildSourceFilters>false</inheritChildSourceFilters>
               <maxRows>10000</maxRows>
               <maxmimumConnections>5</maxmimumConnections>
               <minimumConnections>1</minimumConnections>
               <refreshTime>3</refreshTime>
               <sourceDescription/>
               <sourceId>70108</sourceId>
               <sourceName>c</sourceName>
               <sourceType>MSSQLSERVER</sourceType>
               <timezone>AUSTRALIA/SYDNEY</timezone>
               <userName/>
               <userPassword>cDahEHuTOrk=</userPassword>
            </datasources>
            <datasources>
               <accessLevelCode>UNSECURE</accessLevelCode>
               <connectionDriver>org.postgresql.Driver</connectionDriver>
               <connectionPath/>
               <connectionString>jdbc:postgresql://10.10.0.117:5432/employees</connectionString>
               <connectionTimeout>180</connectionTimeout>
               <connectionType>JDBC</connectionType>
               <connectionTypeCode>GENERICUSER</connectionTypeCode>
               <inheritChildSourceFilters>false</inheritChildSourceFilters>
               <maxRows>10000</maxRows>
               <maxmimumConnections>5</maxmimumConnections>
               <minimumConnections>1</minimumConnections>
               <refreshTime>3</refreshTime>
               <sourceDescription/>
               <sourceId>70101</sourceId>
               <sourceName>Oracle database</sourceName>
               <sourceType>POSTGRESQL</sourceType>
               <timezone>AUSTRALIA/SYDNEY</timezone>
               <userName>postgres</userName>
               <userPassword>6monvQ6/nGZMnqeGlK/yEw==</userPassword>
            </datasources>
            <datasources>
               <accessLevelCode>UNSECURE</accessLevelCode>
               <connectionDriver>oracle.jdbc.OracleDriver</connectionDriver>
               <connectionPath/>
               <connectionString>jdbc:oracle:thin:@10.10.5.184:1521:orcl</connectionString>
               <connectionTimeout>180</connectionTimeout>
               <connectionType>JDBC</connectionType>
               <connectionTypeCode>GENERICUSER</connectionTypeCode>
               <inheritChildSourceFilters>false</inheritChildSourceFilters>
               <maxRows>10000</maxRows>
               <maxmimumConnections>5</maxmimumConnections>
               <minimumConnections>1</minimumConnections>
               <refreshTime>3</refreshTime>
               <sourceDescription/>
               <sourceId>70109</sourceId>
               <sourceName>Oracle</sourceName>
               <sourceType>ORACLE</sourceType>
               <timezone>AUSTRALIA/SYDNEY</timezone>
               <userName>bijin</userName>
               <userPassword>FKpY9TvYog7WT9ZdYhoCUg==</userPassword>
            </datasources>
            <datasources>
               <accessLevelCode>UNSECURE</accessLevelCode>
               <connectionDriver>net.sourceforge.jtds.jdbc.Driver</connectionDriver>
               <connectionPath/>
               <connectionString>jdbc:jtds:sqlserver://:1433/</connectionString>
               <connectionTimeout>180</connectionTimeout>
               <connectionType>JDBC</connectionType>
               <connectionTypeCode>GENERICUSER</connectionTypeCode>
               <inheritChildSourceFilters>false</inheritChildSourceFilters>
               <maxRows>10000</maxRows>
               <maxmimumConnections>5</maxmimumConnections>
               <minimumConnections>1</minimumConnections>
               <refreshTime>3</refreshTime>
               <sourceDescription/>
               <sourceId>70110</sourceId>
               <sourceName>f</sourceName>
               <sourceType>MSSQLSERVER</sourceType>
               <timezone>AUSTRALIA/SYDNEY</timezone>
               <userName/>
               <userPassword>cDahEHuTOrk=</userPassword>
            </datasources>
            <errorCode>0</errorCode>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>8dbd54ecedc55238ece1408713fbc692</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

 

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:

  1. Copy the code and save it as ws_listdatasources .jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and admin user details according to your environment.
  4. 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());
}
%>

 


 

This web service retrieves the metadata of a single data source, that is specified using the Source ID.

 

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 "LOADDATASOURCES".

SourceIdIntegerUnique ID of the data source whose metatdata is to be retrieved.

  

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>LOADDATASOURCE</function>
            <sourceId>54701</sourceId>              
         </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:

  • SUCCESS
  • FAILURE
LoadedDataSourcesAdministrationDataSource[]Object array containing details of the specified data source.

 

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:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/">
         <return>
            <errorCode>0</errorCode>
            <loadedDataSource>
               <accessLevelCode>UNSECURE</accessLevelCode>
               <connectionDriver>org.hsqldb.jdbcDriver</connectionDriver>
               <connectionString>jdbc:hsqldb:file:/Applications/Yellowfin 7.4 86/data/configdb;shutdown=true</connectionString>
               <connectionTimeout>180</connectionTimeout>
               <connectionType>JDBC</connectionType>
               <connectionTypeCode>GENERICUSER</connectionTypeCode>
               <inheritChildSourceFilters>false</inheritChildSourceFilters>
               <maxRows>10000</maxRows>
               <maxmimumConnections>5</maxmimumConnections>
               <minimumConnections>1</minimumConnections>
               <refreshTime>3</refreshTime>
               <sourceDescription/>
               <sourceId>54701</sourceId>
               <sourceName>Yellowfin Configuration Database</sourceName>
               <sourceOptions>
                  <optionKey>ISOLATIONLEVEL</optionKey>
                  <optionValue>1.0</optionValue>
                  <valueDataType>1</valueDataType>
               </sourceOptions>
               <sourceOptions>
                  <optionKey>USESCHEMA</optionKey>
                  <optionValue>true</optionValue>
                  <valueDataType>6</valueDataType>
               </sourceOptions>
               <sourceOptions>
                  <optionKey>YF_DRIVER_SELECTION</optionKey>
                  <optionValue>org.hsqldb.jdbc.JDBCDriver</optionValue>
                  <valueDataType>2</valueDataType>
               </sourceOptions>
               <sourceOptions>
                  <optionKey>CONNECTIONSTRING</optionKey>
                  <optionValue>jdbc:hsqldb:file:/Applications/Yellowfin 7.4 86/data/configdb;shutdown=true</optionValue>
                  <valueDataType>2</valueDataType>
               </sourceOptions>
               <sourceOptions>
                  <optionKey>USEFETCHSIZE</optionKey>
                  <optionValue>false</optionValue>
                  <valueDataType>6</valueDataType>
               </sourceOptions>
               <sourceOptions>
                  <optionKey>FETCHSIZE</optionKey>
                  <optionValue/>
                  <valueDataType>2</valueDataType>
               </sourceOptions>
               <sourceType>GENERICJDBC</sourceType>
               <timezone>AUSTRALIA/SYDNEY</timezone>
               <userName>SA</userName>
               <userPassword>cDahEHuTOrk=</userPassword>
            </loadedDataSource>
            <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
            <messages>Web Service Request Complete</messages>
            <sessionId>6e8fa3d3c3789cef6f6c048d98a1f6a4</sessionId>
            <statusCode>SUCCESS</statusCode>
         </return>
      </ns2:remoteAdministrationCallResponse>
   </S:Body>
</S:Envelope>

 

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:

  1. Copy the code and save it as ws_loaddatasource .jsp.
  2. Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
  3. Adjust the host, port, and admin user details according to your environment.
  4. Run http://<host>:<port>/ws_loaddatasource.jsp from your Internet browser.

 

<%   	
/*    	ws_loaddatasource.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("LOADDATASOURCE");
rsr.setSourceId(54700);
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());
}
%>

 


 

 

 

  • No labels