Showing posts with label Using db adapter in OSB 12c. Show all posts
Showing posts with label Using db adapter in OSB 12c. Show all posts

Monday, July 13, 2020

Database Adapter in OSB 12c

Hi! In this post, I'm going to show you how to use database adapter for selecting the data in the Oracle database in OSB 12c.

1. Create a service bus project with appropriate name.





2. Drag and drop a database adapter into the External Services swim lane. Give it an appropriate name and click Next.




Select the connection and click Next.




Select the Operation Type as Select and click Next.




Click on Import Tables to import the table(s) that we want.




Query the table that you wish to select the data from.




Click on the table name and click right arrow button to drop it into the Selected list.




Click Next.




Select the column that you want to make up the primary key and click Next.




Click Next.




Select the columns that you want to select and uncheck any columns that you don't want to be selected. Click Next.

 


Click on the Add button in the Parameters section to add a parameter.




Specify a name for the parameter. Click OK.




Now, click on highlighted Edit button to add the parameter to query.




Click on Add button and under second Argument section, select the radio button 'Parameter' and click OK.




After doing the above step, you should see your query concatenated with given parameter in the Where clause. Click Next.




In the next two screens, click Next to go with the default values.







Finally, click Finish.





3. Now create a proxy service. Right click on the Proxy Services swim lane. Insert Transports>HTTP.




Give it a proper name or leave it as it is to go with the default name. Check the check box 'Generate Pipeline' and click Next.




Select WSDL as Service Type. Browse the WSDL file in current project.




By default, database adapter creates two WSDL files. Select the one that contains '-concrete' as suffix. Click OK.




Click Next.




Click Finish.




Wire the Proxy service to db adapter as below.




Double click on the Proxy service. If you click on Routing, you'll see the selected business service.




We've done with all the steps, now deploy and test your service.

Featured Posts

Sample Real Time Assignment in Oracle SOA