Using JCA Adapter with OSB 11.1.1.3

In OSB 10g to use the JCA adapters you were required to use JDeveloper to create the necessary WSDLs and XSDs etc using the associated adapter wizard. These files were imported into Oracle Workshop (Eclipse) and used to create the business service as you would any other web service. In 11g unfortunately JDeveloper is still required. The process has changed slightly as described below. As an example I have used the JCA DB adapter as an example.

  1. Start JDeveloper 11.1.1.3
  2. Create a new SOA Application
  3. Create a new SOA Project and call it DBAdapters.

    image
  4. Choose the Empty Composite Template

    image
  5. Drag a Database Adapter Component to the External References panel on the composite. Provide a service name.

    image
  6. Create a new database connection, or use an existing one

    image
  7. Take note of the JNDI Name, e.g.

    eis/DB/MyConnection

    This will be used to configure the DB connection in the WebLogic Console.
  8. In my example I use a stored procedure, but you can use what ever operation you require. Please refer to the following link for other options: User's Guide for Technology Adapters

    image
  9. Select a schema and stored procedure

    image
  10. Once the procedure has been selected, accept the defaults and finish.
  11. Startup your OEPE version of Eclipse.
  12. Create a new Oracle Service Bus Configuration Project (you can use an existing project if you have one)
  13. Create a new Oracle Service Bus Project in the configuration project created above.
  14. Instead of importing the WSDL and XSD files you import the jca file created in JDeveloper. In Eclipse right click the Oracle Service Bus Project and select Import -> Import

    image  
  15. Choose File System

    image
  16. Browse to the directory where JDeveloper stores its project

    image
  17. Select the jca, wsdl, and xsd files based on the service you created in step 5. Also check the 'Create selected folders only' radio button.

    image
  18. When you import you may have a little red x indicating the files are invalid. This is due to the location of the files. Open the invalid files and fix the path in relation to where you store your files in the OSB project.

    image 
  19. Once you have the files all valid, Right-Click the jca file and select Oracle Service Bus -> Generate Service. This will create a new Business Service.

    image
  20. In the WebLogic Console configure the JNDI name defined in step 7.
  21. You can now deploy your project and test
Comments:

This is a very good article.

Posted by guest on June 02, 2011 at 12:54 AM GMT+13:00 #

Hi, thanks for your post.
Iam trying to follow the steps. Iam using Eclipse (ver 3.5.2). When I'm generating the JCA business service, the IDE doesn't let me choose the JCA transport protocol. I tried to import the plugins that contain the JCA protocol, but with any sucessfull result.
Do you have any idea of the step Iam missing? thanks...

Posted by Martin on June 17, 2011 at 07:45 PM GMT+13:00 #

I have just posted a new post to the Blog explaining how to get the the OSB plugin. Not sure what version of OSB you are using but if you are using 11g I would recommend using 3.6.

The JCA support for OSB only arrived in 11.1.1.3. In 10.3.x it was supported but you had to used JDev 10.1.3.x and you would select webservice and use the WSDLs generated from JDeveloper.

Edwin Biemond has provided the steps here: http://biemond.blogspot.com/2009/06/osb-1031-with-database-adapter.html

cheers
James

Posted by guest on June 20, 2011 at 11:01 AM GMT+13:00 #

Hello, James.
Great article!

I just have a question. What do you mean when you say "configure the JNDI" in step 20?

I have followed all the tutorial, except for this step, and it is giving the following error:

<Sep 26, 2011 9:26:36 PM BRT> <Error> <JCATransport> <BEA-381987> <An error occured while validating JCA transport endpoint. JNDI lookup with URL: jca://eis/DB/TransportDatabaseConnection failed. Missing JNDI configuration such as undeployed or misconfigured JCA Adapter RAR or connection factory.>

Do you have any idea of how to fix it?
Thanks in advance!

Posted by Thiagus on September 27, 2011 at 08:43 AM GMT+13:00 #

Yes you need to configure the JNDI name. Have a look at an earlier post http://blogs.oracle.com/middleware/entry/configuring_mssql_with_soa_suite Its for MSSQL but the configuration in WLS console is the same but obviously you need to change for Oracle DB.

Posted by James Taylor on September 27, 2011 at 08:51 AM GMT+13:00 #

Hello Hello, James.
Great article!
I have a question, if the Oracle BPEL Process Manager and JDeveloper, allow me to do the same that in Oracle Service Bus (OSB), related to orchestration, transformation, service calls, etc., then what would be the real difference OSB, ie that I would have an ESB if the BPEL Process Manager and JDeveloper would perform the same.
Thanks in advance, awaiting your response Dalila.

Posted by Dalila on November 01, 2011 at 10:10 PM GMT+13:00 #

Hello, James.
I have a problem when i finish all the steps.
it can read the data from one table,but it can't be read into another table,i do not why?can you help me?

Posted by guest on March 23, 2012 at 08:35 PM GMT+13:00 #

It sounds like you have the adapter working, the issue looks more to do with your OSB code and translations, etc. You would need to provide more information for me to give more detail on what you are experiencing.

cheers
James

Posted by James Taylor on March 24, 2012 at 07:55 AM GMT+13:00 #

Hi,

Can you please tell me what exactly do you mean by, "Open the invalid files and fix the path in relation to where you store your files in the OSB project" in step 18.

Regards,
Yogesh

Posted by yogesh on August 28, 2012 at 09:57 PM GMT+13:00 #

You need to go into each file that has an X. At the top there are namespaces and imports for dependencies etc. Make sure that the path of these dependencies is correct in relation to where the files reside in your project.

cheers
James

Posted by James Taylor on August 28, 2012 at 10:06 PM GMT+13:00 #

hi its urgent,can u tell me .. with out using jdeveloper can i make osb service communicate with database in oepe.. is there any possibilities..
now i am using oepe 11g..

Posted by guest on September 18, 2012 at 06:50 AM GMT+13:00 #

The common way people did DB integration before the Oracle acquisition was via EJBs. There are many sites that show how to create a DB EJB.

Another option is in query there is a DB call out, this is basically used for some complex mappings and enrichment. I'm not sure this is what you are after.

Another option I used before OSB supported the JCA adapter was to create a PL/SQL web service. The easiest way I did that was using JDev as there is an option for a Web service wizard.

cheers
James

Posted by James Taylor on September 18, 2012 at 10:11 AM GMT+13:00 #

I am a bit stuck on step 18 could you elaborate, or show a screenshot of what you put in the source that got rid of the errors.

Posted by guest on October 16, 2012 at 09:58 AM GMT+13:00 #

I think I have made mention of it in comment above.

When you import sometimes the references are incorrect for your project. At the top of your wsdl / jca files have a look at the path and correct for your project.

cheers
James

Posted by James Taylor on October 16, 2012 at 10:22 AM GMT+13:00 #

hi,

Can you please let me know is same approach is applicable to OracleAPPSadapter . If it is applicable i want to use as a inbound operation.

Regards,
Sri.

Posted by sri on April 16, 2013 at 01:12 PM GMT+13:00 #

Yes it is.

cheers
James

Posted by guest on April 16, 2013 at 01:13 PM GMT+13:00 #

Good day, I'm stuck at step 19, the Oracle Workshop doesn't seem to recognize the jca file =/ so, the option "Oracle Service Bus" does not appear.

Posted by guest on June 29, 2013 at 04:58 AM GMT+13:00 #

Have you installed the OSB plugin for Eclipse. If not have a look at this post.

https://blogs.oracle.com/middleware/entry/installing_eclipse_for_osb_development

cheers
James

Posted by guest on June 30, 2013 at 10:31 PM GMT+13:00 #

HiJames
Thanks
Ur gr8
tried accessing the page but all the images are not to be seen
can you send me your email
i'm new in sos and trying to use a stored procedure to insert and select data through soa (eclipse and service bus)
can you help
thanks

Posted by guest on August 30, 2013 at 09:45 AM GMT+13:00 #

If you use IE the images will apear.

Something happend to all the images when the blog site was upgraded.

cheers
James

Posted by guest on August 30, 2013 at 10:55 AM GMT+13:00 #

I am following the steps as given here but connecting to a SQL Server 2008 database. I created the JDev project, imported the relevant files into eclipse. When I right click on jca file, Oracle Service Bus, the Generate Service is disabled. I am using JDev11.1.1.7 with OEPE 11.1.1.8 which is the correct supported version. Has anyone got this to work with SQL Server DB connection?

Posted by guest on October 30, 2013 at 09:53 AM GMT+13:00 #

Anyone know, how to can i call BRM service using JCA adapter!!

Tks

Posted by guest on November 08, 2013 at 05:03 AM GMT+13:00 #

Sorry I don't know BRM, I always thought that BRM exposes APIs via a web service. Is this not the case?

cheers
James

Posted by James Taylor on November 08, 2013 at 01:00 PM GMT+13:00 #

Sorry for the late reply.

If you are using Eclipse you need to make sure that the OSB plugin has been applied. If the Generate Service is disabled this means that your JCA file is invalid. Step 18 I mention this?

Hope this helps
James

Posted by James on November 08, 2013 at 01:06 PM GMT+13:00 #

Thnak James.

I have a JCA BRM Adapter expose in weblogic server.

BRM is to AIA application and exposes an interface as JCA

I have not JCA,WSDL,XSD files similar to those generated by a dbAdpter for example.

The only way to connect by JCA is taking the 3 files (JCA WSDL, XSd files)?

Tks

Posted by guest on November 09, 2013 at 02:12 AM GMT+13:00 #

Sorry I don't believe the BRM JCA adapter is supported in OSB.

cheers
James

Posted by James Taylor on November 11, 2013 at 10:54 PM GMT+13:00 #

I was able to create the JCA adapter for the DB2 database successfully, however when I try to promote the OSB project from DEV to TEST I'm not able to change the DB2 library name using the Customization File.

Please let me know the steps for changing the SQL for promotion.

Thanks.

Posted by Abdul on November 23, 2013 at 10:39 AM GMT+13:00 #

When migrating between environments it is the JNDI name that is used. Best practice on this is to have a naming convention for your JNDI names, ie, for the HR DB you would call it, eis/DB/HR.

What your system administrator would do is create an entry in all environments for eis/DB/HR, but they are pointing to different database. That way you don't need to chnage any configuration at all.

I'm unsure how you have configured the DB2 connection but all you need to do is put the drivers in the classpath of the Weblogic startup scripts and configure the datasource. It should have nothing to do with the OSB deployment.

cheers
James

Posted by James on November 25, 2013 at 01:33 PM GMT+13:00 #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Discussions and Examples using Oracle Fusion Middleware. Some image links are broken when using Firefox, Safari, and Chrome. If you want to see the full image please use IE.

Twitter:@james8001

tumblr hit counter vistors, thanks for your support

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today