Monday, February 13, 2012

Oracle Service Bus 11g and SOA Suite DB Adapter

I have not enough experience for Oracle Service Bus and SOA Suite. I have been working on Web Service(OSB) for about 2 years.
In today, I am posting about DB adapter to use create business service on OSB.

The post will show How to get data rows from any Database . My Data is into HR schemas. HR schema is oracle database demo schema and you can download if you have not. First project is SOA SUITE application on JDeveloper.



1. Start jdeveloper IDE. Create new Application. New Gallery dialog will show.


select SOA Project from items and click Ok.insert to Application name "SOA_HR".
2. Create new SOA Project. right click in the application project and new project.



3. Create Inbound DB adapter.

select DB Adapter and drag to SCA Composite. follow dialog appear. Click next.

4. Insert service name and click next. Service named "Department".

5. Service connection dialog appear. select a database connection already defined in your project or create new connection. HrDS connection is HR schemas. I hope You can create database connection for JDeveloper IDE. You need to attension to JNDI name. This string configured on DbAdapter jar. click next.

6. DbAdapter have some operation types. You can call procedure or function already defined in Database. else execute Insert,Update and Delete operations. or execute pure SQL query. select statement from dialog. click next.

7.Click Import tables. click next.

8. If your imported tables are relationship tables You can set relationship between tables. If no , click next button.

9. Attribute filtering choose dialog. If you would like to exclude all attributes from the database, check all.Primary key attributes cannot be excluded. That's are disabled.

10. You can define selection criteria.


11.Click next .

12.Import jdeveloper project to eclipse workspace. You need to do follow steps.
The first, you must be create OSB Configuration project and OSB project into workspace.





13. then Run JCA business service and input dep_id parameter. click execute.



well, I hope this post help you teaching adapter service and osb. next time I will post get data to use FTP and FILE adapters.

No comments:

Post a Comment