Page History
Anchor | ||||
---|---|---|---|---|
|
User replication involves synchronising each user in the OEM third-party application with a named user in Yellowfin. This allows Yellowfin to identify the user who is logged in, and to apply any restrictions that may be required. Synchronization is usually performed using web service calls from the OEM the third-party application to Yellowfin. This can also be managed manually if users in the OEM the third-party application are generally static.
This section will outline how to create, manipulate, and delete users via web services. It is assumed that the web service is called to mirror user changes immediately after a user modification is made in the OEM third-party application.
Main User Management Functions
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function creates a new user account in Yellowfin. RequestElementsParametersThe 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:
Request ExampleThe following SOAP XML example shows the parameters that you can pass to this call:
ReponseElementsParametersThe response returned will contain these parameters:
Reponse 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 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:
Request ParametersThe 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:
Reponse ParametersThe response returned will contain these parameters:
InstructionsSee below for step-by-step instructions on how to perform this call, using a Java example:
|
...
title | ADDUSERSIGNOREDUPLICATES |
---|
This function allows multiple users to be created, without adding duplicates. It works similarly to the ADDUSERS function, however in this case, if the login ID or email of a potential new user is already in use, or the password isn't supplied, then a 'no exceptions' error will be generated and the user will not be created. The response will contain an array of AdministrationPerson objects with failed users that were not added.
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:
|
People | AdministrationPerson[] | Failed users whose accounts were not created. |
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
...
title | Step-by-step instructions |
---|
...
Code Block | ||
---|---|---|
| ||
rsr.setFunction("ADDUSERSIGNOREDUPLICATES"); |
...
Code Block | ||
---|---|---|
| ||
AdministrationPerson[] failed_users = rs.getPeople(); |
Complete ExampleBelow is a complete example of the ADDUSERS 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:
|
...
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
People | AdministrationPerson[] | Failed users whose accounts were not created. |
...
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:
Anchor | | deluserap | deluserap |
AdministrationPerson Element | Data Type | Description |
---|---|---|
UserId | String | User ID of the user that you wish to delete. This user should already exist in Yellowfin. This value could be a user ID or an email address, depending on the Logon ID method. |
The following SOAP example shows the parameters that you can pass to this call:
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> ap[0].setPassword("test"); <password>test</password> <orgId>1</orgId> <function>DELETEUSER</function> ap[0].setEmailAddress("user1@yellowfin.com.au"); ap[1] = new AdministrationPerson(); ap[1].setUserId("user2@yellowfin.com.au"); <person> <userId>binish.sheikh@yellowfin.com.au</userId> ap[1].setFirstName("user2"); ap[1].setLastName("Lastname2"); ap[1].setRoleCode("YFREPORTCONSUMER"); ap[1].setPassword("test"); </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 service will return the below response, according to our SOAP example:
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>cc8c2b81d06485fdd20fe4cd24f5f70c</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:
ap[1].setEmailAddress("user2@yellowfin.com.au");
rsr.setPeople(ap);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if
("SUCCESS".equals(rs.getStatusCode() ) ) {
out.write("Success");
} else {
out.write("Failure");
out.write("Code: " + rs.getErrorCode() );
}
%>
|
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function allows multiple users to be created, without adding duplicates. It works similarly to the ADDUSERS function, however in this case, if the login ID or email of a potential new user is already in use, or the password isn't supplied, then a 'no exceptions' error will be generated and the user will not be created. The response will contain an array of AdministrationPerson objects with failed users that were not added. Request ParametersThe 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:
Reponse ParametersThe response returned will contain these parameters:
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("DELETEUSER");
|
The function requires an AdministrationPerson object, which is used to specify which user to delete, by providing their ID (for example, their email address or another type of ID depending on the Login ID method):
Code Block language java AdministrationPerson ap = new AdministrationPerson(); ap.setUserId("test@yellowfin.com.au"); // test@yellowfin.com.au should be an existing Yellowfin user. rsr.setPerson(ap);
After configuring the request, perform the call:
Code Block language java AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
Then initialize the Administration web service. Click here to learn how to do this.
The response will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCode | String | Status of the web service call. Possible values include:
|
Complete Example
Below is a complete example of the DELETEUSER function. To use it for yourself, carry out the following the steps:
- Copy the below code and save it as ws_deleteuser.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to delete details according to your environment.
- Run http://<host>:<port>/ws_deleteuser.jsp from your Internet browser.
Code Block | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
<%
/* ws_deleteuser.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();
rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account
rsr.setPassword("test");
|
...
|
Anchor | ||||
---|---|---|---|---|
|
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. |
Once a user has been created, the user's details can be retrieved using a web service call. The User ID field in the AdministrationPerson object is used to identify the user. As a result, a populated AdministrationPerson object will be returned. For security reasons, passwords will not be returned and will be NULL. User information can also be validated against the application in this section.
...
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 parameters that you need to set in the AdministrationPerson object:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
Response ExampleThe service will 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:
InstructionsSee 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 DELETEUSER function. To use it for yourself, carry out the following the steps:
- Copy the below code and save it as ws_deleteuser.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to delete details according to your environment.
- Run http://<host>:<port>/ws_deleteuser.jsp from your Internet browser.
Code Block | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
AdministrationServiceRequest<%rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("GETUSER");Now provide the user ID via the AdministrationPerson object:
Initialize the Administration web service. Click here to learn how to do this. The response will contain the following parameters:
To display the retrieved user details, use the following example: Code Block | | |||||||||||||||||||
|
Retrieving & Validating User Information
Once a user has been created, the user's details can be retrieved using a web service call. The User ID field in the AdministrationPerson object is used to identify the user. As a result, a populated AdministrationPerson object will be returned. For security reasons, passwords will not be returned and will be NULL. User information can also be validated against the application in this section.
Anchor | ||||
---|---|---|---|---|
|
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:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Complete Example Below is a complete example of the GETUSER function. To use it for yourself, carry out the following the steps:
|
...
Reponse ElementsThe response returned will contain these parameters:
Reponse 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 Example Below is a complete example of the GETUSER function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This functions retrieves details of all the users in a specified client organization. The information is retrieved in an array of AdministrationPerson objects. If a client organization is not specified, then all the users will be retrieved. You can use the setParameters() method to specify a searching criteria for users being retrieved. For security reasons, passwords will not be returned and will be NULL. 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 parameters:
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 Example Below is a complete Java example of the GETALLUSERS function. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
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:
Following is the main parameter that you need to set in the AdministrationPerson object for this function:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
Reponse 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 complete example of the GETUSERBYIP function. To use it for yourself, first carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
|
Expand | ||
---|---|---|
| ||
This web service is used to retrieve users' avatar images. If an avatar image is not set up for a user in Yellowfin, then no image will be retrieved for that user. This service requires the users' internal IDs (that is, their IP ID). Request ParametersThe following parameters should |
...
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This functions retrieves details of all the users in a specified client organization. The information is retrieved in an array of AdministrationPerson objects. If a client organization is not specified, then all the users will be retrieved. You can use the setParameters() method to specify a searching criteria for users being retrieved. For security reasons, passwords will not be returned and will be NULL.
Request ElementsThe following elements will be passed with this request:
Request ExampleBelow is a SOAP XML example for this requestThe following SOAP example shows the parameters that you can pass to this call:
Reponse Elements Response ParametersThe returned response returned will contain these parameters:
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 complete Java full example of the GETALLUSERS functionthis web service call. To use it for yourself, carry out the following the steps:
|
Anchor | ||||
---|---|---|---|---|
| ||||
Anchor | ||||
|
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.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:
Anchor | | getuseripap |
account. | ||
OrgId | Integer | Default (i.e. Primary) organization ID within Yellowfin. Always set this to 1. |
Function | String | Web services function. Set this to "VALIDATEUSER". |
Person | Object containing details of the user who is to be validated. Note: See table below. | |
OrgRef | String | Client organization reference ID (optional). Provide this if you need to validate the user of a specific organization. |
Anchor | ||||
---|---|---|---|---|
|
These are the main parameters that you need to set in the AdministrationPerson object for this function:
AdministrationPerson |
---|
These are the parameters that you need to set in the AdministrationPerson object:
AdministrationPerson Element | Data Type | Description |
---|---|---|
IpId | Integer | IP ID of the user whose information is to be retrieved. |
The following SOAP example shows the parameters that you can pass to this call:
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>GETUSERBYIP</function>
<person>
<ipId>5</ipId>
</person>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
Reponse Elements
The response returned will contain these parameters:
Response Element | Data Type | Description |
---|---|---|
StatusCodeUser ID | String | Status of the web service call. Possible values include:
|
Person | AdministrationPerson | Object with the user details |
User ID of the user to validate. This can be the user ID or the email address, depending on the Logon ID method. | ||
Password | String | Password of the above account. |
Request Example
The following SOAP example shows the parameters that you can pass to this callThe service will return the below response, according to our SOAP example:
Code Block | ||
---|---|---|
| ||
<S<soapenv:Envelope xmlns:Ssoapenv="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:remoteAdministrationCallResponse xmlns:ns2web="http://webservices.web.mi.hof.com/"> <return> <errorCode>0</errorCode><soapenv:Header/> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Getting user information...</messages> <messages>Getting user information...</messages> <messages>Web Service Request Complete</messages><soapenv:Body> <web:remoteAdministrationCall> <person> <arg0> <emailAddress>admin@yellowfin<loginId>admin@yellowfin.com.au</emailAddress>loginId> <firstName>System</firstName><password>test</password> <initial/><orgId>1</orgId> <function>VALIDATEUSER</function> <person> <ipId>5</ipId> <languageCode>EN</languageCode> <userId>admin@yellowfin.com.au</userId> <lastName>Administrator<<password>test</lastName>password> <roleCode>YFADMIN</roleCode></person> </arg0> <salutationCode</>web:remoteAdministrationCall> <status>ACTIVE</status> <timeZoneCode>AUSTRALIA/SYDNEY</timeZoneCode> <userId>admin@yellowfin.com.au</userId> </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:
|
Person | Object with the user details. |
Reponse Example
The service will return the below response, according to our SOAP example:
Code Block | ||
---|---|---|
| ||
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> </person><ns2:remoteAdministrationCallResponse xmlns:ns2="http://webservices.web.mi.hof.com/"> <sessionId>81e76f1222d0dd12d9871efc7cbf0811</sessionId><return> <statusCode>SUCCESS</statusCode> </return> <errorCode>0</errorCode> </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 | ||||||
---|---|---|---|---|---|---|
| ||||||
Here is a basic request for this call:
Code Block | | |||||
|
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:
|
Person | AdministrationPerson | Object with the user details |
Code Block | ||
---|---|---|
| ||
if ("SUCCESS".equals(rs.getStatusCode()) ) {
ap = rs.getPerson();
out.write("UserId: " + ap.getUserId() + "<br>");
out.write("Password: " + ap.getPassword() + "<br>");
out.write("FirstName: " + ap.getFirstName() + "<br>");
out.write("LastName: " + ap.getLastName() + "<br>");
out.write("Initial: " + ap.getInitial() + "<br>");
out.write("SalutationCode: " + ap.getSalutationCode() + "<br>");
out.write("RoleCode: " + ap.getRoleCode() + "<br>");
out.write("EmailAddress: " + ap.getEmailAddress() + "<br>");
out.write("LanguageCode: " + ap.getLanguageCode() + "<br>");
out.write("IpId: " + ap.getIpId() + "<br>");
out.write("TimeZoneCode: " + ap.getTimeZoneCode() + "<br>");
out.write("Status: " + ap.getStatus() + "<br>");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode());
}
|
<userId>admin@yellowfin.com.au</userId>
</person>
<sessionId>0ee8ae23d21ff01f365d1e03ea49c47a</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 GETUSERBYIP VALIDATEUSER function. To use it for yourself, first carry out the following the steps:
- Copy the code and save it as ws_getuserbyipvalidateuser.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT folder.
- Adjust the host, port, admin user and user IpId to validate according to your environment.
- Run http://<host>:<port>/ws_getuserbyipvalidateuser.jsp from your Internet browser.
Code Block | ||
---|---|---|
| ||
<% /* ws_getuserbyipvalidateuser.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(); 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("GETUSERBYIP"); AdministrationPerson ap = new AdministrationPerson(); ap.setIpId(5); rsr.setPerson(ap); AdministrationServiceResponseAdministrationServiceRequest rsrsr = adminService.remoteAdministrationCall(rsrnew AdministrationServiceRequest(); if rsr.setLoginId("SUCCESS".equals(rs.getStatusCode()) ) { ap = rs.getPerson(); out.write("User Id: " + ap.getUserId() + "<br>"); out.write("Password: " + ap.getPassword() + "<br>"); out.write("First Name: " + ap.getFirstName() + "<br>"); out.write("Last Name: " + ap.getLastName() + "<br>"); out.write("Initial: " + ap.getInitial() + "<br>"); out.write("Salutation Code: " + ap.getSalutationCode() + "<br>"); out.write("Role Code: " + ap.getRoleCode() + "<br>"); out.write("Email Address: " + ap.getEmailAddress() + "<br>"); out.write("Language Code: " + ap.getLanguageCode() + "<br>"); out.write("IpId: " + ap.getIpId() + "<br>"); out.write("Time Zone Code: " + ap.getTimeZoneCode() + "<br>");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("VALIDATEUSER"); AdministrationPerson ap = new AdministrationPerson(); ap.setUserId("john.smith@yellowfin.com.au"); ap.setPassword("test"); rsr.setPerson(ap); rsr.setOrgRef("org1"); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Status:User " + ap.getStatus() + "<br>"is authenticated"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode() ); } %> |
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This function call 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. '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 objectthe AdministrationPerson object for this function:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
Reponse 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 complete example of the VALIDATEUSER VALIDATEPASSWORD function. To use it for yourself, carry out the following the steps:
|
Manipulating User Information
A user's details can be modified at a later time using a web service call. The User ID field in the AdministrationPerson object is used to identify the user, so this cannot be changed. The rest of the fields within an AdministrationPerson object are populated with the new changes. .
Anchor | ||||
---|---|---|---|---|
|
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. 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:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call:
Reponse ElementsThe response returned will contain these parameters:
Reponse 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 Example
Complete Example Below is a complete example of the VALIDATEPASSWORD CHANGEPASSWORD function. To use it for yourself, carry out the following the steps:
|
Manipulating User Information
A user's details can be modified at a later time using a web service call. The User ID field in the AdministrationPerson object is used to identify the user, so this cannot be changed. The rest of the fields within an AdministrationPerson object are populated with the new changes. .
|
Anchor | ||||
---|---|---|---|---|
|
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 for this function:
|
...
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:
Anchor | | changepassap |
Password | String | Password of the above account. |
Request Example
The following SOAP example shows the parameters that you can pass to this call:
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>test321</password>
<orgId>1</orgId>
<function>RESETPASSWD</function>
<person>
<userId>admin@yellowfin.com.au</userId>
<password>test321</password>
</person>
</arg0>
</web:remoteAdministrationCall>
</soapenv:Body>
</soapenv:Envelope> |
Reponse Elements
The response returned will contain these parameters:
Response |
---|
These are the mandatory parameters that you need to set in the AdministrationPerson object:
AdministrationPerson Element | Data Type | Description |
---|---|---|
UserIdStatusCode | StringUser | ID Status of the user whose password is to be changed. This can be the user ID or the email address, depending on the Logon ID method. |
Password | String | The new password of the user. This must comply with Yellowfin's Password Policy. |
web service call. Possible values include:
|
Request Example
The service will return the below response, according to our SOAP exampleThe following SOAP example shows the parameters that you can pass to this call:
Code Block | ||
---|---|---|
| ||
<soapenv<S:Envelope xmlns:soapenvS="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:remoteAdministrationCallResponse xmlns:webns2="http://webservices.web.mi.hof.com/"> <soapenv:Header/> <soapenv:Body> <web:remoteAdministrationCall><return> <arg0> <loginId>admin@yellowfin.com.au</loginId><errorCode>0</errorCode> <password>test</password> <messages>Successfully Authenticated <orgId>1</orgId>User: admin@yellowfin.com.au</messages> <function>CHANGEPASSWORD</function> <person> <userId>admin@yellowfin.com.au</userId><messages>Web Service Request Complete</messages> <password>test321</password><sessionId>beabd94a9ffaa562a8b9ba823fc291a0</sessionId> <<statusCode>SUCCESS</person>statusCode> </arg0>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 | ||
---|---|---|
| ||
|
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 service will return the below response, according to our SOAP example:
|
Complete Example
Below is a complete example of the RESETPASSWD function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_resetpwd.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to reset according to your environment.
- Run http://<host>:<port>/ws_resetpwd.jsp from your Internet browser.
Code Block | ||
---|---|---|
| ||
<%
/* | ||
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> ws_ resetpwd.jsp <errorCode>0</errorCode> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> <messages>Web Service Request Complete</messages> <sessionId>f6bdc33348cd76d7898f3bed3e54ff31</sessionId> <statusCode>SUCCESS</statusCode> */ %> <%@ 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); <//return> adjust host and port </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 | ||
---|---|---|
| ||
This example shows a basic request for this call: Code Block | | |
|
Code Block | ||
---|---|---|
| ||
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au");
ap.setPassword("test123");
rsr.setPerson(ap); |
Code Block | ||
---|---|---|
| ||
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); |
Initialize the Administration web service. Click here to learn how to do this.
The response will contain these parameters:
Response
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au");
rsr.setPerson(ap);
AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr);
if ("SUCCESS".equals(rs.getStatusCode()) ) {
out.write("Account is reset");
} else {
out.write("Failure");
out.write(" Code: " + rs.getErrorCode() );
}
%>
Anchor | ||||
---|---|---|---|---|
|
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:
Request ExampleThe following SOAP example shows the parameters that you can pass to this call. This example shows the user's status being changed to "Inactive":
Complete Example Below is a complete example of the CHANGEPASSWORD function. To use it for yourself, carry out the following the steps:
|
...
Reponse ElementsThe response returned will contain these parameters:
|
...
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:
Anchor | | resetpassap |
Object with the user details updated. |
Response Example
The service will return the below response, according to our SOAP example:
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>Getting user information...</messages>
<messages>Getting user information...</messages>
<messages>Web Service Request Complete</messages>
<person>
<emailAddress>binish.sheikh@yellowfin.com.au</emailAddress>
<firstName>Binish</firstName>
<ipId>13000</ipId>
<lastName>Sheikh</lastName>
<roleCode>YFADMIN</roleCode>
<status>ACTIVE</status>
<timeZoneCode>AUSTRALIA/BRISBANE</timeZoneCode>
<userId>binish.sheikh@yellowfin.com.au</userId>
</person>
|
These are the mandatory parameters that you need to set in the AdministrationPerson object to create a new user:
AdministrationPerson Element | Data Type | Description |
---|---|---|
UserId | String | User ID of the user whose password is to be reset. This can be the user ID or the email address, depending on the Logon ID method. |
Password | String | Password of the above account. |
The following SOAP example shows the parameters that you can pass to this call:
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><sessionId>586e172a7c4850bb3edbaaf5264a312d</sessionId> <loginId>admin@yellowfin.com.au</loginId><statusCode>SUCCESS</statusCode> <password>test321</password></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 | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||
|
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 service will return the below response, according to our SOAP example:
|
Complete Example
Below is a complete example of the UPDATEUSER function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_updateuser.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to update according to your environment.
- Run http://<host>:<port>/ws_updateuser.jsp from your Internet browser.
Code Block | ||
---|---|---|
| ||
<% | ||
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>beabd94a9ffaa562a8b9ba823fc291a0</sessionId> /* <statusCode>SUCCESS</statusCode> ws_updateuser.jsp </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:
title | Step-by-step instructions |
---|
Code Block | ||
---|---|---|
| ||
AdministrationServiceRequest rsr = new AdministrationServiceRequest();
rsr.setLoginId("admin@yellowfin.com.au");
rsr.setPassword("test");
rsr.setOrgId(1);
rsr.setFunction("RESETPASSWD");
|
Code Block | ||
---|---|---|
| ||
AdministrationPerson ap = new AdministrationPerson();
ap.setUserId("john.smith@yellowfin.com.au");
rsr.setPerson(ap); |
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:
|
Complete Example
Below is a complete example of the RESETPASSWD function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_resetpwd.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to reset according to your environment.
- Run http://<host>:<port>/ws_resetpwd.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.*" %> <% 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(); rsr.setLoginId("admin@yellowfin.com.au"); //* provide your Yellowfin web services admin account rsr.setPassword("test"); ws_ resetpwd.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(); rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account rsr.setPassword("test"); // change to the password of the account above rsr.setOrgId(1); rsr.setFunction("RESETPASSWD"); AdministrationPerson ap = new AdministrationPerson(); ap.setUserId("john.smith@yellowfin.com.au"); rsr.setPerson(ap); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { out.write("Account is reset"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode() ); } %> |
...
|
Anchor | ||||
---|---|---|---|---|
|
Expand | |||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
This web service is used to upload an avatar image for a specified user. The image should be an array of bytes in UTF-8 which you could convert to a String value. Request ParametersThe following parameters should be passed with this request:
These are the main parameters that you must set in the AdministrationPerson object for this web service call:
Request ExampleBelow is a SOAP XML example for this request:
Response ParametersThe returned response will contain the following parameter:
Response ExampleThe service will return the below response, according to our SOAP example:
|
...
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:
Anchor | | updateuserap | updateuserap |
AdministrationPerson Element | Data Type | Description |
---|---|---|
UserId | String | User ID to identify the user whose details are to be changed. This can be the user ID or the email address, depending on the Logon ID method. |
Provide any other parameters related to the user detail that needs to be updated. For example, a new FirstName to change their name, or Status to update their status, etc. |
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":
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></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 | |||||
---|---|---|---|---|---|
| |||||
|
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:
|
Person | AdministrationPerson | Object with the user details updated. |
The service will return the below response, according to our SOAP example:
|
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_ setavatarimage.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, and admin user according to your environment.
- Run http://<host>:<port>/ws_ setavatarimage.jsp from your Internet browser.
Code Block | ||||
---|---|---|---|---|
| ||||
<%
/* | ||||
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> ws_setavatarimage.jsp <errorCode>0</errorCode> <messages>Successfully Authenticated User: admin@yellowfin.com.au</messages> */ %> <%@ page language="java" contentType="text/html; charset=UTF-8" %> <%@ <messages>Getting user information...</messages> <messages>Getting user information...</messages> <messages>Web Service Request Complete</messages> <person> <emailAddress>binish.sheikh@yellowfin.com.au</emailAddress> <firstName>Binish</firstName> <ipId>13000</ipId> page import="com.hof.util.*, java.util.*, java.text.*" %> <%@ page import="com.hof.web.form.*" %> <%@ page import="com.hof.mi.web.service.*" %> <%@ page import="java.nio.file.Files" %> <%@ page import="java.nio.file.Paths" %> <%@ page import="java.nio.file.Path" %> <% 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(); rsr.setLoginId("admin@yellowfin.com.au"); // provide your Yellowfin web services admin account rsr.setPassword("test"); <lastName>Sheikh</lastName> <roleCode>YFADMIN</roleCode> // change to the password of the above <status>ACTIVE</status> <timeZoneCode>AUSTRALIA/BRISBANE</timeZoneCode> <userId>binish.sheikh@yellowfin.com.au</userId> account rsr.setOrgId(1); rsr.setFunction("SETAVATARIMAGE"); AdministrationPerson ap = new AdministrationPerson(); ap.setIpId(5); rsr.setPerson(ap); Path path = Paths.get("D:/TMP/fish.jpg"); // existing image file byte[] data = Files.readAllBytes(path); byte[] encodeBase64 = java.util.Base64.getEncoder().encode(data); String img = new String(encodeBase64, "UTF-8"); rsr.setParameters(new String[] {img}); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { </person> out.write("<br>Success"); } else { <sessionId>586e172a7c4850bb3edbaaf5264a312d</sessionId> <statusCode>SUCCESS</statusCode> out.write("Failure"); </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:
out.write(" Code: " + rs.getErrorCode());
}
%>
|
User Session Termination
These services can end user's Yellowfin sessions.
Anchor | ||||
---|---|---|---|---|
|
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 Expand | | ||||||||||||||
|
Code Block | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||
AdministrationServiceRequestStringrsr token =new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); rsr.setPassword("test"); rsr.setOrgId(1); rsr.setFunction("UPDATEUSER"); Then use the AdministrationPerson object to identify the user whose details are to be updated:
Specify what detail is to be changed. For example, we can make a user account inactive:
Initialize the Administration web service. Click here to learn how to do this. This call's response will contain these parameters: Response response.getLoginSessionId(); |
Save this value, so that you can pass it out to the LOGOUTUSER request later:
Code Block | ||
---|---|---|
| ||
request.setLoginSessionId(token); |
Request Elements
The following elements will be passed with this request:
Request Element | Data Type | Description |
---|---|---|
LoginId | String | Yellowfin web services admin user Id. This can be the user ID or the email address, depending on the Logon ID method. This Yellowfin 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 services function. Set this to "LOGOUTUSER". |
Person | AdministrationPerson | This object will contain the details of the use who is to be logged out. See the table below. |
LoginSessionId | String | Session token of the Yellowfin instance that needs to be terminated. This is enough to identify the user. |
Anchor | ||||
---|---|---|---|---|
|
Mandatory parameters to set in the AdministrationPerson object for this function:
AdministrationPerson Element | Data Type | Description |
---|
UserId | String |
Status of the web service call. Possible values include:
- SUCCESS
- FAILURE
Person
AdministrationPerson
Object with the user details
User ID to identify the user whose details are to be changed. This can be the user ID or the email address, depending on the Logon ID method. | ||
Password | String | Password of the above account. |
Request Example
The following SOAP XML example shows the request for this function using the above parameters:
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>
|
Complete Example
Below is a complete example of the UPDATEUSER function. To use it for yourself, carry out the following the steps:
- Copy the code and save it as ws_updateuser.jsp.
- Put the file in the root folder: Yellowfin/appserver/webapps/ROOT.
- Adjust the host, port, admin user and user to update according to your environment.
- Run http://<host>:<port>/ws_updateuser.jsp from your Internet browser.
Code Block | ||
---|---|---|
| ||
<% <arg0> /* <loginId>admin@yellowfin.com.au</loginId> <password>test</password> ws_updateuser.jsp <orgId>1</orgId> */ %> <%@ 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); <function>LOGOUTUSER</function> <person> // adjust host and port number AdministrationServiceSoapBindingStub adminService = (AdministrationServiceSoapBindingStub) s_adm.getAdministrationService(); AdministrationServiceRequest rsr = new AdministrationServiceRequest(); rsr.setLoginId("admin@yellowfin.com.au"); <userId>admin@yellowfin.com.au</userId> // provide your Yellowfin web services admin account rsr.setPassword("test");<password>test</password> </person> <loginSessionId>39fb11047affb98c9d081fb48bed0093</loginSessionId> </arg0> <//web:remoteAdministrationCall> change to the password of the above account rsr.setOrgId(1); rsr.setFunction("UPDATEUSER"); AdministrationPerson ap = new AdministrationPerson(); ap.setUserId("john.smith@yellowfin.com.au"); ap.setStutus("INACTIVE"); rsr.setPerson(ap); AdministrationServiceResponse rs = adminService.remoteAdministrationCall(rsr); if ("SUCCESS".equals(rs.getStatusCode()) ) { ap = rs.getPerson(); out.write("User Id: " + ap.getUserId() + "<br>"); out.write("Password: " + ap.getPassword() + "<br>"); out.write("First Name: " + ap.getFirstName() + "<br>"); out.write("Last Name: " + ap.getLastName() + "<br>"); out.write("Initial: " + ap.getInitial() + "<br>"); out.write("Salutation Code: " + ap.getSalutationCode() + "<br>"); out.write("Role Code: " + ap.getRoleCode() + "<br>"); out.write("Email Address: " + ap.getEmailAddress() + "<br>"); out.write("Language Code: " + ap.getLanguageCode() + "<br>"); out.write("IpId: " + ap.getIpId() + "<br>"); out.write("Time Zone Code: " + ap.getTimeZoneCode() + "<br>"); out.write("Status: " + ap.getStatus() + "<br>"); } else { out.write("Failure"); out.write(" Code: " + rs.getErrorCode() ); } %> |
User Session Termination
These services can end user's Yellowfin sessions.
Reponse ElementsThe response returned will contain these parameters:
Reponse ExampleHere 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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:
Anchor | | logoutap |
|
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 logoutuser.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>/logoutuser.jsp from your Internet browser.
Code Block | ||
---|---|---|
| ||
<% |
Mandatory parameters to set in the AdministrationPerson object:
AdministrationPerson Element | Data Type | Description |
---|---|---|
UserId | String | User ID to identify the user whose details are to be changed. This can be the user ID or the email address, depending on the Logon ID method. |
Password | String | Password of the above account. |
The following SOAP XML example shows the request for this function using the above parameters:
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>LOGOUTUSER</function> logoutuser.jsp <person> <userId>admin@yellowfin.com.au</userId> <password>test</password> </person> <LoginSessionId>39fb11047affb98c9d081fb48bed0093</LoginSessionId> </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:
|
Here is the resposnse of the above SOAP XML call:
Code Block | ||
---|---|---|
| ||
|
Instructions
See below for step-by-step instructions on how to perform this call, using a Java example:
Expand | ||
---|---|---|
| ||
Code Block | ||
| ||
Here is a basic request for this call: Code Block | | |
|
Code Block | ||
---|---|---|
| ||
rsr.setLoginSessionId(token);
|
language | java |
---|
AdministrationPerson ap = newString[]{sessionId}; // log out by Tomcat session Id (cookies JSESSIONID) rsr.setParameters(_sessionId);Only one session should be provided for termination per request. Note that the Tomcat session ID is optional; if omitted, Yellowfin will terminate all of the user's sessions.
Once the request is configured, perform the call:
language | java |
---|
AdministrationPerson(); String userId = "john.smith@yellowfin.com.au"; ap.setUserId(userId); ap.setPassword("test"); rsr.setPerson(ap); 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:
|
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.
<% /* test.jsp 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 */ %> <%@ 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);Yellowfin web services admin account rsr.setPassword("test"); // adjustset hostthe andpassword portof number AdministrationServiceSoapBindingStubthe 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");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() ); } } %> |
Anchor | ||||
---|---|---|---|---|
|
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's IP ID (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:
Request ExampleThe following XML SOAP example shows a request for this function being passed:
|
...
Reponse ElementsThe response returned will contain these parameters:
Request ExampleThe response of our above SOAP example is shown below:
|
...
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:
Anchor | | logoutuserap | logoutuserap |
AdministrationPerson Element | Data Type | Description |
---|---|---|
UserId | String | User ID to identify the user to terminate their Yellowfin session. This can be the user ID or the email address, depending on the Logon ID method. |
IpId | String | Ip ID of the user whose session is to be terminated. |
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:
|
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 this 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() );
}
}
%>
|