Page History
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function creates a new user account in Yellowfin.
Request ElementsThe following elements will be passed with this request:
These are the mandatory parameters that you need to set in the AdministrationPerson object to create a new user:
The following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
The 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 Example Below is a full example of the ADDUSER function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||
---|---|---|---|---|---|
| |||||
This function creates users in bulk. It is similar to the ADDUSER function, however this requires that you pass an array of AdministrationPerson objects. Note: Ensure that you mention the proper name of this function, which is ADDUSERS.
Complete ExampleBelow is a complete example of the ADDUSER function. This example code adds two new Yellowfin users, user1@yellowfin.com.au and user2@yellowfin.com.au, in the default organization. To use it for yourself, carry out the following the steps:
|
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function will delete a specified user from Yellowfin. Note: To remove a user from a client organization, you should perform the REMOVEUSERACCESS call.
Request ElementsThe following elements will be passed with this request:
These are the parameters that you need to set in the AdministrationPerson object:
The following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
The 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 Example Below is a complete example of the DELETEUSER function. To use it for yourself, carry out the following the steps:
|
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function retrieves an existing Yellowfin user's details. It accepts AdministrationPerson as a parameter which you can use to identify the user. The response will contain the AdministrationPerson object with full user details.
Request ElementsThe following elements will be passed with this request:
These are the main parameters that you need to set in the AdministrationPerson object for this function:
The following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
The 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 Example Below is a complete example of the GETUSER function. To use it for yourself, carry out the following the steps:
|
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function will retrieve details of a user by their IP. It accepts the AdministrationPerson object as a parameter, which can be used to identify the user, by providing their IPID (in the Yellowfin configuration database, this is the IpId field of the Person table). The response will contain the AdministrationPerson object with the full details of the user.
Request ElementsThe following elements will be passed with this request:
These are the parameters Following is the main parameter that you need to set in the AdministrationPerson object for this function:
The following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
The 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 Example Below is a complete example of the GETUSERBYIP function. To use it for yourself, first carry out the following the steps:
|
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function validates a Yellowfin user. You can specify the user by using the AdministrationPerson as a parameter. The response will be SUCCESS if the user with provided details exists. Otherwise, the response will return code 25 (COULD_NOT_AUTHENTICATE_USER) if the user is not valid.
Request ElementsThe following elements will be passed with this request:
These are the main parameters that you need to set in the AdministrationPerson object for this function:
The following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
The 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 complete example of the VALIDATEUSER function. To use it for yourself, carry out the following the steps:
|
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This call validates a user's password. If the password is expired, the call will return SUCCESS as the StatusCode, otherwise it will return FAILURE. Keep in mind that for a freshly created user who has not yet logged into Yellowfin, the call retrieves SUCCESS meaning that their password is expired. This happens because for every new user, Yellowfin is required to reset the password at the first login.
Request ElementsThe following elements will be passed with this request:
These are the mandatory parameters that you need to set in the AdministrationPerson object for this function:
The following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
The 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 complete example of the VALIDATEPASSWORD function. To use it for yourself, carry out the following the steps:
|
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function will change the password for the specified Yellowfin user. The password will be reset through the AdministrationPerson parameter, based on their user ID (email address or another type of ID depending on the Login ID method).
Request ElementsThe following elements will be passed with this request:
These are the mandatory parameters that you need to set in the AdministrationPerson object for this function:
The following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
The 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 Example Below is a complete example of the CHANGEPASSWORD function. To use it for yourself, carry out the following the steps:
|
...
Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function resets a user's Yellowfin account and prompts them to change their password. This call will not change the password of the account itself. To change the password, use the CHANGEPASSWORD function.
Request ElementsThe following elements will be passed with this request:
These are the mandatory parameters that you need to set in the AdministrationPerson object to create a new userfor this function:
The following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
The 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 Example Below is a complete example of the RESETPASSWD function. To use it for yourself, carry out the following the steps:
|
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This call will edit a user’s details. It accepts AdministrationPerson as a parameter, which can be used to identify the user, by providing their ID (for example, their email address, or another type of ID depending on the Logon ID method). The response will contain the AdministrationPerson object with the full details of the user. Note: This call will not change the password of the user's account. To change the password, use the CHANGEPASSWORD function.
Request ElementsThe following elements will be passed with this request:
Mandatory parameters to set in the AdministrationPerson object for this function:
The following SOAP example shows the parameters that you can pass to this call. This example shows the user's status being changed to "Inactive":
Reponse ElementsThe response returned will contain these parameters:
The 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 complete example of the UPDATEUSER function. To use it for yourself, carry out the following the steps:
|
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This service terminates a Yellowfin session. However, it requires the LoginSessionId to be able to log the user out. This is is enough to identify the user, hence the user ID is not required. When a single sign-on is performed with either the LOGINUSER or LOGINUSERNOPASSWORD functions, you can get the LoginSessionId via:
Save this value, so that you can pass it out to the LOGOUTUSER request later:
Request ElementsThe following elements will be passed with this request:
Mandatory parameters to set in the AdministrationPerson object for this function:
The following SOAP XML example shows the request for this function using the above parameters:
Reponse ElementsThe response returned will contain these parameters:
Here is the resposnse of the above SOAP XML call:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example: Expand | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Code Block | ||
---|---|---|
| ||
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("LOGOUTUSER"); |
Code Block | ||
---|---|---|
| ||
rsr.setLoginSessionId(token);
|
Code Block | ||
---|---|---|
| ||
String[] _sessionId = new String[]{sessionId}; // log out by Tomcat session Id (cookies JSESSIONID)
rsr.setParameters(_sessionId); |
Once the request is configured, perform the call:
Code Block | ||
---|---|---|
| ||
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
Initialize the Administration web service. Click here to learn how to do this.
This call's response will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
<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>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>9cad6c76734e329c298e7b15c57a19db</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:
Expand | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
|
Complete Example
Below is a complete example of the LOGOUTUSER function. This script is designed to perform the following steps:
- Call the LOGINUSER service which retrieves the LoginSessionId;
- Configures the login link. You will need to click this link first, to initialize a Yellowfin session for the specifed user. (In our example we will log in the user john.smith@yellowfin.com.au. Make sure that the user you mention, already exists in your Yellowfin instance, or you can even modify the userId.)
- Configure the link to log out. You will need to click this once the session has started.
To use this script for yourself, carry out the following the steps:
- Copy the code and save it as test.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to login/logout according to your environment.
- Run http://<host>:<port>/test.jsp from your Internet browser.
Code Block | ||
---|---|---|
| ||
<%
/* test.jsp |
Complete Example
Below is a complete example of the LOGOUTUSER function. This script is designed to perform the following steps:
- Call the LOGINUSER service which retrieves the LoginSessionId;
- Configures the login link. You will need to click this link first, to initialize a Yellowfin session for the specifed user. (In our example we will log in the user john.smith@yellowfin.com.au. Make sure that the user you mention, already exists in your Yellowfin instance, or you can even modify the userId.)
- Configure the link to log out. You will need to click this once the session has started.
To use this script for yourself, carry out the following the steps:
- Copy the code and save it as test.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to login/logout according to your environment.
- Run http://<host>:<port>/test.jsp from your Internet browser.
Code Block | ||
---|---|---|
| ||
<% /* test.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.*" %> <% AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService(); AdministrationServiceRequest rsr = new AdministrationServiceRequest(); String token = request.getParameter("token"); if (token == null) { //login the admin user: rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account rsr.setPassword("test"); */ %> <%@ 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.*" %> <% AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // changeadjust tohost theand passwordport ofnumber AdministrationServiceSoapBindingStub the adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService(); AdministrationServiceRequest rsr = new AdministrationServiceRequest(); String token = request.getParameter("token"); if (token == null) { //login the admin user: rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account rsr.setPassword("test"); // change to the password of the above account rsr.setOrgId(1); rsr.setFunction("LOGINUSER"); AdministrationPerson ap = new AdministrationPerson(); String userId = "john.smith@yellowfin.com.au"; ap.setUserId(userId); ap.setPassword("test"); rsr.setPerson(ap); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { String token_ = rs.getLoginSessionId(); out.write("Login by opening the link in a new subtab prior to Logout. The tomcat session must be initialized..."); out.write("<BR>Login: <A href='http://localhost:8080/logon.i4?LoginWebserviceId=" + token_ + "'>"); out.write("http://localhost:8080/logon.i4?LoginWebserviceId=" + token_ + "</a><br>"); out.write("<BR>Logout: <A href='http://localhost:8080/test.jsp?token=" + token_ + "&userId=" + userId + "'>"); out.write("http://localhost:8080/test.jsp?token=" + token_ + "&userId=" + userId + "</a><br>"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode() ); return; } } else { //logout the user: out.write("Trying to logout " + token + " session...<br>"); rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account rsr.setPassword("test"); // set the password of the above account rsr.setOrgId(1); rsr.setFunction("LOGOUTUSER"); rsr.setLoginSessionId(token); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Logout: Success"); } else { out.write("Failure"); out.write("Code: " + rs.getErrorCode() ); } } %> |
...
Expand | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||
This service is similar to the LOGOUTUSER function in that it logs out a specified user, however this one requires either a user ID (for example, an email address or any other type of ID depending on the Login ID method) or a user IpID (that is, the value of the IpId field in the Person table in Yellowfin's database), rather than a login session ID to identify the user. This call uses the AdministrationPerson object which is used to provide the user ID or IpId.
Request ElementsThe following elements will be passed with this request:
Set either one of these parameters in the AdministrationPerson object:
Reponse ElementsThe response returned will contain these parameters: | |||||||||||||||||||||||||||||||||
Response Element | Data Type | Description |
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:remoteAdministrationCall>
<arg0>
<loginId>admin@yellowfin.com.au</loginId>
<password>test</password>
<orgId>1</orgId>
<function>LOGOUTBYUSERID</function>
<person>
<userId>admin@yellowfin.com.au</userId>
<password>test</password>
</person>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
Reponse Elements
The response returned will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
The response of our above SOAP example is shown below:
Code Block | ||
---|---|---|
| ||
<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>
<messages>Successfully Authenticated User: admin@yellowfin.com.au</messages>
<messages>Web Service Request Complete</messages>
<sessionId>f8a04d7c9530ff18f65f95048e6a4500</sessionId>
<statusCode>SUCCESS</statusCode>
</return>
</ns2:remoteAdministrationCallResponse>
</S:Body>
</S:Envelope> |
StatusCode
String
Status of the web service call. Possible values include:
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Expand | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||
|
Complete Example
Below is a complete example of the LOGOUTUSER function. This script is designed to perform the following steps:
- Configures the login link. You will need to click this link first, to initialize a Yellowfin session for the specifed user. (In our example we will log in the user john.smith@yellowfin.com.au. Make sure that the user you mention, already exists in your Yellowfin instance, or you can even modify the userId.)
- Configure the link to log out. You will need to click this once the session is set up.
To use this script for yourself, carry out the following the steps:
- Copy the code and save it as test.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to login/logout according to your environment.
- Run http://<host>:<port>/test.jsp from your Internet browser.
Code Block | ||
---|---|---|
| ||
<% /* test.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.*" %> <% AdministrationServiceService s_adm = new AdministrationServiceServiceLocator("localhost",8080, "/services/AdministrationService", false); // adjust host and port number AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService(); AdministrationServiceRequest rsr = new AdministrationServiceRequest(); String userId = request.getParameter("userId"); if (userId == null) { //login the admin user: rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account rsr.setPassword("test"); // set the password of the above account rsr.setOrgId(1); rsr.setFunction("LOGINUSER"); AdministrationPerson ap = new AdministrationPerson(); userId = "john.smith@yellowfin.com.au"; ap.setUserId(userId); ap.setPassword("test"); rsr.setPerson(ap); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { String token_ = rs.getLoginSessionId(); out.write("Login by opening the link in a new subtab prior to Logout. The tomcat session must be initialized..."); out.write("<BR>Login: <A href='http://localhost:8080/logon.i4?LoginWebserviceId=" + token_ + "'>"); out.write("http://localhost:8080/logon.i4?LoginWebserviceId=" + token_ + "</a><br>"); out.write("<BR>Logout: <A href='http://localhost:8080/test.jsp?token=" + token_ + "&userId=" + userId + "'>"); out.write("http://localhost:8080/test.jsp?token=" + token_ + "&userId=" + userId + "</a><br>"); }else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode() ); return; } } else { //logout the user: out.write("Trying to logout " + userId + " session...<br>"); rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account rsr.setPassword("test"); // change to the password of the above account rsr.setOrgId(1); rsr.setFunction("LOGOUTBYUSERID"); AdministrationPerson ap = new AdministrationPerson(); ap.setUserId(userId); rsr.setPerson(ap); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Logout: Success"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode() ); } } %> |
...