Friday, September 11, 2020

DB operation using fn-bea:execute-sql function from the OSB using Xpath

 First create a OSB Application

Create a pipeline and assign the query as shown in below screen shot
Drag drop the pipeline in the center queue of playground

Double click on the proxy pipeline and insert Pipeline pair Node

Put this query
{ fn-bea:execute-sql(‘jdbc/siddhu’, xs:QName(‘EMPLOYEE’), ‘select ID, FIRST_NAME, LAST_NAME, SALARY from EMPLOYEE’)}

jdbc/siddhu = Database source name
EMPLOYEE = Table name
select ID, FIRST_NAME, LAST_NAME, SALARY from EMPLOYEE = query

Create a data store with name jdbc/siddhu in weblogic as shown below

1- login to console
http://localhost:7101/console/

2- Go to setting and datasource

Now execute the applicaiton and see the result as shown belwo

i.e. right click on the proxy pipe line and select run

Note:- you can check if your SQL query is written right by executing the same from X-Query Expression Builder

No comments: