The following name-value pairs are required to retrieve a list of domains from the Managed Reporting repository.
Request Parameter |
Value |
Description |
---|---|---|
IBIMR_action |
MR_GET_ DOMAINS |
Before retrieving a list of domains 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_DOMAINS" ); 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_GET_DOMAINS"> <RETURN_TYPE_VERSION>1</RETURN_TYPE_VERSION> <CURRENT_USER flgs="admin,advanced,dataserver,savemyreport," href="admin.htm" name="admin" desc="Default Administrator" role="#MRAdministrator"/> <MR_GET_DOMAINS> <HREF href="untitled/untitled.htm" desc="default domain"/> </MR_GET_DOMAINS> <RETURNCODE>1000</RETURNCODE> </ibwfrpc>
WebFOCUS |