I was going through the new BI Publisher feature of 10.1.3.3.1 which is the Web Service APIs. Till the earlier release we only had Java APIs. But in the latest release we have the SOAP APIs or the WSDL APIs so that any end user can access the reports remotely using standard web service calls. To try this out, i had installed JDeveloper 11g Tech Preview 2. But somehow i was not able to make the Web Services work from JDeveloper. I constantly got “not a recognized SOAP header error”. So, i downloaded another tool called Mindreef SOAPScope. They provide an evaluation copy for 13 days. Well, i was literally amazed by the power of this tool. It would be good to have similar features in JDeveloper. You can download SOAPScope here.
Coming back to BI Publisher WSDL, there are 7 main methods that are exposed to end users. They are
1. getFolderContents – This method helps in retrieving all the contents within a folder.
2. getReportDefinition – As the name suggests this retrieves the report definition for the report which you give as a parameter.
3. getReportParameters – This retrieves the parameters of the report.
4. hasReportAccess – This checks whether a particular user has access to the report specified.
5. runReport – This is the method which would help in running the report. One can retrieve the contents in the form of PDF, HTML etc.
6. scheduleReport – This method exposes the scheduler functionality of BI Publisher.
7. validateLogin – This checks whether a specific user can log into BI Publisher.
The below picture gives all the methods as seen by SOAPScope.
validateLogin: Now lets test out all the methods starting from validateLogin. As shown below this method accepts two parameters which is the username and the password. The return field of this function is a boolean data type which would give a true or false depending on the user credentials.
getFolderContents: The next method which we shall test is the getFolderContents. This method accepts three parameters. Username, Password and the absolute path of the foldername. For example,
Folder Name: /HR Manager
The absolute path is actually relative to the URL. I am not sure whether one can access my folders content since the absolute path seem to take all the folders only inside the Shared Folders. The return data set of this function is all the contents of this folder including subfolders and reports(not the recursive reports).
getReportDefinition: This method accepts username, password and the absolute path of the report as its input. The return type is its definition that would include the parameters, templates, data sources etc. The reportAbsolute path should include the xdo path. Eg. /HR Manager/Employee Salary Report/Employee Salary Report.xdo
getReportParameters: This method accepts username, password and the reportRequest as its parameter. reportRequest is a structure that has arguments like
In our case we would just include reportAbsolutePath, username and the password. This would return 2 parameters of the Employee Salary Report which is the department and employees.
hasReportAccess: This accepts username, password and the reportabsolute path as the set of parameters. It checks whether the user specified by the username parameter has the privilege to run the report.
runReport: This is the method which would help in running the report. It accepts the same set of parameters like the getReportParameters. The output would contain a Doublebinary byte which would have to be converted to the corresponding output like html, pdf etc.
scheduleReport: This method exposes the entire scheduler functionality. There are a lot of parameters which i would not go in details since most are self explanatory.
I tried creating a sample application. But i am not sure whether the documentation has specified all the jars required in the invoking client as i had to include 3 more jars.