The following name-value pairs can be used to retrieve a list of users.
Request Parameter |
Value |
Description |
---|---|---|
IBIMR_action |
MR_GET_USERS |
Required. Used to invoke the action to retrieve the users from the Managed Reporting Repository. Before retrieving a list of users valid MR credentials with administrative rights must be provided. |
IBIMR_returntype |
Valid values are XML and MRCGI |
Optional. Used to specify the format of the result set. The default is MRCGI. |
//Obtain the path to ibiweb.cfg String cgiLocation = application.getInitParameter("webfocus_client_root")+File.separator+"web" +File.separator+"cgi"; String contextroot = application.getInitParameter("webfocus_path"); //Create a request and response object WFApplicationRequest workerReq = new WFApplicationRequest(); WFResponse workerResp = new WFServletResponse( response ); //Instantiate the WFServletVariableTableExtension to add name/value pairs to the request WFServletVariableTableExtension wfSVTExtension = new WFServletVariableTableExtension( request, application ); //Sign-on to Managed Reporting workerReq.addParameter( "IBIMR_action", "MR_SIGNON" ); workerReq.addParameter( "IBIMR_user", "admin" ); workerReq.addParameter( "IBIMR_pass", "admin" ); workerReq.addParameter( "IBIMR_returntype", "XML" ); WFWorkerUtil.processRequest( cgiLocation, workerReq, workerResp, wfSVTExtension, null ,null, null ); //Reinitialize the request with the previous response cookies and obtain all MR Domains workerReq.Initialize( workerResp.getCookies() ); workerReq.addParameter( "IBIMR_action", "MR_GET_USERS" ); workerReq.addParameter( "IBIMR_returntype", "XML" ); WFWorkerUtil.processRequest( cgiLocation, workerReq, workerResp, wfSVTExtension, null ,null, null );
<?xml version="1.0" encoding="ISO-8859-1" ?> <ibwfrpc name="MR_SIGNON"> <RETURN_TYPE_VERSION>1</RETURN_TYPE_VERSION> <RETURNCODE>1000</RETURNCODE> </ibwfrpc> <?xml version="1.0" encoding="ISO-8859-1" ?> <ibwfrpc name="MR_GET_USERS"> <RETURN_TYPE_VERSION>1</RETURN_TYPE_VERSION> <USERS_COUNTS>uact:4 uina:0 umax:4000</USERS_COUNTS> <CURRENT_USER flgs="admin,advanced,dataserver,savemyreport," href="admin.htm" name="admin" desc="Default Administrator" role="#MRAdministrator"/> <MR_GET_USERS flgs="admin,advanced,dataserver,savemyreport," href="admin.htm" name="admin" desc="Default Administrator" role="#MRAdministrator"> <MR_GET_GROUPS> <HREF href="#carsales" name="carsales" desc="Car Sales"/> <HREF href="#default" name="default" desc="Default Group"/> </MR_GET_GROUPS> </MR_GET_USERS> <MR_GET_USERS flgs="auser,,savemyreport,advanced,email=user1@ibi.com" href="user1.htm" name="user1" pass="1ca41975909bff3e4b062b" desc="WF Analytical User" role="#AnalyticalUser"> <MR_GET_GROUPS> <HREF href="#default" name="default" desc="Default Group"/> </MR_GET_GROUPS> </MR_GET_USERS>|<MR_GET_USERS flgs="auser,,savemyreport,email=nobody@ibi.com" href="verylong.htm" name="Very long User Name to Test Length" desc="Length Test" role="#AnalyticalUser"> <MR_GET_GROUPS> <HREF href="#default" name="default" desc="Default Group"/> </MR_GET_GROUPS> </MR_GET_USERS> <MR_GET_USERS flgs="user,," href="public.htm" name="public" desc="Public User" role="#User"> <MR_GET_GROUPS> <HREF href="#public" name="public" desc="Public Group"/> </MR_GET_GROUPS> </MR_GET_USERS> <RETURNCODE>1000</RETURNCODE> </ibwfrpc>
WebFOCUS |