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 4 Next »

Yellowfin provides a Java web service API for connecting to the SOAP web services, but it is also possible to connect from practically any other programming language or environment such as .NET, Ruby and Python.

You need to have a Yellowfin user with rights to perform web services calls. Ensure that this is turned on in the user role. Click here to learn how that is done.

 

 

Calling Java API

The Yellowfin Web Service API contains pre-generated stubs. This can be used directly in applications that are developed in Java, or other languages that support Java integration, such as Cold Fusion or Lotus Script.

API can be called internally under Yellowfin Tomcat using JSP. The code samples can be found in the yellowfin/development/examples/webservices folder, once Yellowfin is installed. All you need to do is to copy the JSP files into the Yellowfin/appserver/webapps/ROOT folder and adjust the host, port number, and user details in the JSP files according to your environment. We recommend ensuring that you can achieve what you want using this method prior to replicating this with other languages or environments.

 

However, you can also call web services externally, that is outside of Yellowfin Tomcat. To do so, you will need:

  • yfws-<date>.jar which can be found in the development/lib folder in the Yellowfin directory. 

    Do not forget to get a new yfws-xxx.jar file after a Yellowfin upgrade (you need to download a corresponding yfws-xxx.jar file from the Yellowfin website).

  • Apache Axis: Refer to https://axis.apache.org/axis/ for more information on this.

 

A full objects’ definitions can be found at Yellowfin/development/doc/webservices/Javadoc/index.html

There are two ways of calling Java API, as covered in the following sections.

Using Pre-built Java Functions

You can use pre-built Java functions to call Yellowfin API. This makes development a little bit easier as you are using pre-built functions, rather than configuring each request manually.

The code samples regarding this method can be found in the development/examples/webservices folder. See the jsp files with ‘api’ in their names. A good starting point is copying files with ‘mobile’ in their names, into the Yellowfin ROOT folder and explore.

 

 

Performing SOAP Calls

Performing direct SOAP calls using Java generated stubs off Yellowfin WSDL.

All the code samples under Administration Service and Report Service sections are explained using SOAP calls in Java. In this Wiki, all the examples of using Yellowfin web services are explained assuming that you call Yellowfin API from Yellowfin Tomcat (that means you use JSP and all your files go to Yellowfin/appserver/webapps/ROOT folder). Using languages other than Java will not bring much complexity to the code.

 

Use this command to initialize the Administration web services:

AdministrationServiceService s_adm = new AdministrationServiceServiceLocator(<host>,<port>,<ServicePath>, <ssl>);        

AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService();

 

 

Use this command to initialize the Report web services:

ReportServiceService s_rpt = new ReportServiceServiceLocator(<host>, <port>, <ServicePath>, <ssl>);

ReportServiceSoapBindingStub reportService = (ReportServiceSoapBindingStub) s_rpt.getReportService();

 

See below for an explanation of these parameters:

ParameterTypeDescription

host

String

Yellowfin server (can be server DNS name, IP address, URL or “localhost”)

port

Integer

http port number to access Yellowfin server

ServicePath

String

Path to the service

Administration service path: "/services/AdministartionService"

Report service path: "/services/ReportService"

ssl

Boolean

If SSL enabled: true


The primary objects include:

An object that defines the type of call being made to the web service.

 

Object parameters:

Parameter NameType
sessionIdString
loginIdString
passwordString
ntlmBoolean
orgIdInteger
loginSessionIdString
orgRefString
queryString
reportIdInteger
dashboardTabIdInteger
functionString
personAdministrationPerson
groupAdministrationGroup
reportAdministrationReport
clientAdministrationClientOrg
reportGroupAdministrationReportGroup
favouritePersonFavourite
contentResourcesContentResource[]
importOptionsImportOption[]
roleAdministrationRole
retrospectiveDaysInteger
binaryDatabyte[]
peopleAdministrationPerson[]
datasourceAdministrationDataSource
sourceClientLinkAdministrationDataSourceClientLink
sourceIdInteger
scheduleAdministrationSchedule

 

All parameters have corresponding “get” and “set” methods. For instance:

AdministrationServiceRequest sr = new AdministrationServiceRequest();
sr.setSessionId(savedSessionID);

 

It is not necessary to define all the parameters; each web service call has a list of the required parameters. If you do not specify parameters of the call, they will have null value by default.

There are mandatory parameters for any request:

loginId                                      - Yellowfin account with web services role switched on and must be Yellowfin

  default (primary) org user;

password                                 - password of the above account

orgId                                          - should be always 1 which is default org ID.

function                                   - type of the call.

Other parameters will be required depending on the function value.

Each request must contain the web service user details: who can call Yellowfin webservices. This must be existing user with “Webservices” role being ticked, and these details should be specified as loginId, password, orgId.

 

 

 

 

  • AdministrationServiceRequest
  • AdministrationServiceResponse

 

 

 

 

 

 

 

 

  • No labels