Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product...

Preview:

Citation preview

Oracle ESBIntegration to Oracle Interconnect through IC Adapter

Oracle Integration Product Management

Scenario Overview

Use CaseBuild a asynchronous routing flow in the Oracle ESB which subscribes to newCustomerevents on the IC Hub, enriches the newCustomer data with an Emailaddress through call to SOAP Service and finally publiches the new customer data as an AddCustomer event on the IC Hub.

IC Adapter Inbound and OutboundService Routing

Scenario Overview

Features- Create ESB app. in IStudio- Configuration of IC Adapter- IC Adap. InboundService- IC Adap.Outbound Service- Console Instance Tracking- ESB Routing Service- Transformation

IC Adapter Inbound and OutboundService Routing

Scenario Overview

Steps- Configure IC Adapter- Create Publish/Subscribe

scenairo in IC- Create ESB project in JDev- Model Asynchronous routing

flow in ESB Designer- Use IC Adapter Inbound Service

to route to routing flow- Route from routing flow to IC

Adapter Outbound Service- Register with ESB Server- Run the test file- View Results

IC Adapter Inbound and OutboundService Routing

Create Publish/Subscribe scenario in IC

Create the scenario as described in the Oracle Appl ication Server Interconnect User’s guide 10.1.2 Appendix A A4.1 to A4.7

This scenario was meant to use Oracle BPEL PM but w e will use Oracle ESB instead

Deploy the EmailService Web Service

• Open the EmailService.jpr file i JDeveloper ESB Designer

• Deploy the EmailService project to the ESB oc4j Container (or another one if you want!)– Right click on the WebServices.deploy file and select the

appropriate application server connection

• Once deployed test the EmailService to see if its working correctly– Go to the Test Endpoint for the Web Service– If deployed in ESB Preview2 Container it’s

http://10.10.10.10:8888/emailservice/EmailWSSoapHttpPortWhere you probably has another host

Deploy the IC Adapter1. Open Command Prompt

• CD to the folder where admin_client.jar is located

2. Deploy IcAdapter"java –jar admin_client.jar deployer:oc4j:opmn://<<h ostname>>: <<opmn request

port>>/oc4j_soa <<oc4j userid>> <<oc4juserpassword>> -deploy –file ORACLE_HOME\integration\esb\lib\icAdapter.rar -deplo ymentName IcAdapter”

3. Deploy icwsilplugin"java –jar admin_client.jar deployer:oc4j:opmn://<<h ostname>>: <<opmn request

port>>/oc4j_soa <<oc4j userid>> <<oc4juserpassword>> -deploy –file ORACLE_HOME\integration\esb\lib\icwsilplugin.ear –d eploymentName icwsilplugin –parent default”

4. Bind icwsilplugin• “java –jar admin_client.jar deployer:oc4j:opmn://<< hostname>>: <<opmn request port>>/oc4j_soa

<<oc4j userid>> <<oc4juserpassword>> -bindWebApp –app Name icwsilplugin –webModuleName icwsilplugin–webSiteName default-web-site –contextRoot /ic"

5. Shutdown the ESB server6. Run the "regadapters.bat/sh script“7. Restart the ESB Server

Configure the IC Adapter in Oracle ESBFirst edit the oc4j-ra.xml file located in <esb_home>\j2ee\home\application-deployments\defaul t\ICAdapter

<?xml version="1.0"?><oc4j-connector-factories ...... schema-minor-versi on="0" ><connector-factory location="eis/ICAdapter" connect or-name="InterconnectAdapter">

<config-property name="applicationName” value="BPEL PM"/><config-property name="driverClassName"

value="oracle.jdbc.driver.OracleDriver"/><config-property name="connectionString"

value="jdbc:oracle:thin:@bpel-db-as:1521:ORCL"/><config-property name="userName" value="ichub"/><config-property name="password" value="Manager1"/><config-property name="repoName” value="InterConnect Repository"/><connection-pooling use="none"></connection-pooling ><security-config use="none"></security-config>

</connector-factory></oc4j-connector-factories>

Name of the Istudio Application Name

Configure the IC Adapter in Oracle ESBSecond add the following <code-source path=”<IC_HOME>\integration\interconnect\lib\oai.jar"/>to the Server.xml file located in <ESB_HOME>\j2ee\home\config

<shared-library name=”esb" version="1.0" library-co mpatible="true"><code-source path="C:\oracle\mid\integration\interc onnect\lib\oai.jar"/><code-source path="../../../integration/esb/lib/ora bpel-common.jar"/><code-source path="../../../integration/esb/lib/ora bpel-thirdparty.jar"/><code-source path="../../../integration/esb/lib/ora bpel.jar"/><code-source path="../../../integration/esb/lib/ora bpel-boot.jar"/><code-source path="../../../integration/esb/lib/bpm -infra.jar"/><code-source path="../../../integration/esb/lib/oli te40.jar"/><code-source path="../../../integration/esb/lib/wdk .jar"/><import-shared-library name="apache-commons"/><import-shared-library name="oracle.xml"/><import-shared-library name="oracle.jdbc"/><import-shared-library name="oracle.jwsdl"/><import-shared-library name="oracle.dms"/><import-shared-library name="soap"/><import-shared-library name="oracle.ws.client"/>

</shared-library>

Remember to restart theESB server

Configure the IC Adapter in Oracle ESB

When starting the ESB Console you should see the fo llowing:

Create ESB project in JDev

Name it “ICRouting”Click “Save”

Create new System

Click to create a System for logical groupingName it “CustomerServices”Click “OK”

Import XSDs

Import Xml Schema type definitions by selecting ”Import....” from the ”File” menu

Select ”Web Source” and click ”OK”

Import XSDsClick ”Browse” and find the ”NewCustomerCommonView”

Select ”NewCustomerCommonView”And click ”OK”

Create SOAP Service

Drag onto the Designer WindowName the Service “EmailService”Give the WSDL url of the EmailService for the “Serv ice WSDL File” -> Click “OK”

Create Routing Service…

1. Drag onto the Designer Window

2. Name it “EmailRoutingService”

3. Click “Generate WSDL from Schemas”

4. Click “Browse” and select “Customer” element from ‘Project Schema Files / newCustomerCOmmonView’

5. Give it Operation Name “routeNewCustomer”

6. Click “OK”

Define Routing for EmailRoutingService

Double click on the header of EmailRoutingService

Define Routing for EmailRoutingService

1. Click on ”Routing Rules”

2. Click on

Define Routing for EmailRoutingService

Select the ”setEmailForCustomer”operation

Click ”OK”

Define Routing for EmailRoutingService

Add transformation of the request type to ”setEmail ForCustomer”Click for the Request

Define Routing for EmailRoutingService

Create New Mapper Fileand use the sugggestedname

Drag imp1:Customer

to tns0:SetEmailForCustomerElement

Define Routing for EmailRoutingService

Use the AutomapFacility to make theTransformation

Click ’OK’Click

Define Routing for EmailRoutingService

This is the result ofUsing the AutomapFacility

Close .... .xsl editorWindow

Click next to’Target_Operation’

Define Routing for EmailRoutingServicePick the IC Adapter PublishedEvent operation

Customer_AddCustomerpublish

Define Routing for EmailRoutingService

This gives you aScreen like this

Click to createA transformationFor the reply

Define Routing for EmailRoutingService

Create New Mapper Fileand use the sugggestedname

Drag tns0:SetEmailForCustomerElementto imp1:Customer

Define Routing for EmailRoutingService

Use the AutomapFacility to make theTransformation

Click ’OK’Click

Define Routing for EmailRoutingService

This is the result ofUsing the AutomapFacility

Select and Delete theTns0:firstName tons1:name Transformation

Drag from theComponent palette ontoThe mid-section of the XSL editor window

Define Routing for EmailRoutingService

Drag tns0:lastName

and tns0:firstName

Onto

Drag from right side ofto ns1:name

The result is on thefigure to the left

Double click on

Define Routing for EmailRoutingService

Click ’Add’ to add a Delimiter ”,”

The result should beJust like the the figure

Click ’OK’

Save and Close the ... .xsl editor Window

Define Routing for EmailRoutingService

We now haveDefined theEmailRoutingService

The result shouldLook like this

Close the EmailRoutingServiceEditor Window

Register the EmailRoutingService to ESB

This is the EMailRoutingService

flow which we now want to Register to the ESB

To Register..Right click on the projectAnd select ’Register with ESB’Choose ’LocalESBServer’

Register the EmailRoutingService to ESB

If the EmailRoutingService flowss registered correct to the ESBthe following will appear...

This concludes the Usage of theOracle ESB Designer

We will now go to the ESB ConsoleTo couple the IC Adapter inbound

Routing service to our newly createdEmailRoutingService

Couple the IC Adapter Inbound Routing Service

Open the ESB Console

Click to refreshthe services

Couple the IC Adapter Inbound Routing Service

The CustomerService System appearsand the EmailService and the EmailRoutingService

within it

Click ’EmailRoutingService’ to see the flow

Couple the IC Adapter Inbound Routing Service Click ’Customer_newCusto..’ to see the

IC Adapter Inbound Routing ServiceClick on the routing service

Couple the IC Adapter Inbound Routing Service

Click on ’Routing Rules’

Click on

Couple the IC Adapter Inbound Routing Service

Find and Select theEmailRoutingServiceOperation routeNewCustomer

Click ’Select’...

Click

Couple the IC Adapter Inbound Routing Service

We now have finishedthe Complete flow

The result should belike this...

We only miss to testit to see whether theRouting flow is correct

Test the Case

1. Copy Customer.xml to the IC FTP Adapter configured outbound catalog

2. When it disappears from the catalog go to the ESB Console

3. Click 4. Click refresh the messages5. The result should be...

Test the CaseWhen clicking the Customer_newCustmer_RSRouting service message theFollowing appears..

Test the Case

Checking the tableFor the IC DB Adapter.....

This concludes theIC Adapter and ESBIntegration demo case

Recommended