Wednesday, March 26, 2014

Create an OBIEE report based on Web Service

For better understanding we will create an Employee web service with few input parameters. This web service will take EmployeeName and EmployeeId as input parameter and display a custom message based on the input values.
Open you Jdeveloper and create a new SOA project and create a synchronous BPEL process







Once you complete the wizard you will get following composite file.



Go to the default schema file and change it to take two input parameter : name and Id as shown below



Open BPEL process and add an assign activity to it.



Add the following logic in the assign to append the input parameter with custom message and map it to output parameter.



Deploy and test your web service

Input



Output




Create Report in OBIEE
Now once we have developed a SOA service we will take this web service as an example to create a report based on this web service.
Log in to OBIEE analytics page and create a data model



Once you create a data model just go to the page and define two parameter Name and Id same as the one in your Web service.



Specify some default value for your output data
Go to Data set and create a data set
Select Web Service as model





Specify the information
WSDL URL will be the wsdl url for the SOA web service and method will be the input operation of the web service.
Add the two parameters as shown below




Save all the changes and create a sample data
Here you can notice that it has automatically created the output data from the result of our web service. So internally it takes the input parameters and calls the web service for the output as each time a report is called with a new set of input parameter an instance is created in the back end em console of SOA suite.



Save this sample data and create a report based on this sample data.
Click on create report




Use the data model we have created
Select your data model




Select the default option




Select the default output variable which the data model has created for you based on the response parameter of the web service.





Save the report as some dummy name.



Save the Report and as soon as you will see the report you will find following output



As you can observer the report has two input parameter which we have the same as our web service
Since we have specified the default value hence it has populated the result with the default input parameter. One can change the input parameter and test it again. The important point is that each time an apply button is clicked a new SOA instance is getting created in the backend SOA to fetch the output result.


Go to the SOA em console
http://host:port/em
and check the instance details for the web service.
Each time when you will say apply a new instance will be created.





The same result can be seen in the Report as an output variable

No comments: