oracle esb esb integration to oracle interconnect through ic adapter oracle integration product...

42
Oracle ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Upload: trinhthien

Post on 08-Mar-2018

250 views

Category:

Documents


6 download

TRANSCRIPT

Page 1: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Oracle ESBIntegration to Oracle Interconnect through IC Adapter

Oracle Integration Product Management

Page 2: Oracle ESB ESB Integration 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

Page 3: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 4: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 5: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 6: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 7: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 8: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 9: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 10: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Configure the IC Adapter in Oracle ESB

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

Page 11: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Create ESB project in JDev

Name it “ICRouting”Click “Save”

Page 12: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Create new System

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

Page 13: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Import XSDs

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

Select ”Web Source” and click ”OK”

Page 14: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Import XSDsClick ”Browse” and find the ”NewCustomerCommonView”

Select ”NewCustomerCommonView”And click ”OK”

Page 15: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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”

Page 16: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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”

Page 17: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

Double click on the header of EmailRoutingService

Page 18: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

1. Click on ”Routing Rules”

2. Click on

Page 19: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

Select the ”setEmailForCustomer”operation

Click ”OK”

Page 20: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

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

Page 21: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

Create New Mapper Fileand use the sugggestedname

Drag imp1:Customer

to tns0:SetEmailForCustomerElement

Page 22: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

Use the AutomapFacility to make theTransformation

Click ’OK’Click

Page 23: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

This is the result ofUsing the AutomapFacility

Close .... .xsl editorWindow

Click next to’Target_Operation’

Page 24: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingServicePick the IC Adapter PublishedEvent operation

Customer_AddCustomerpublish

Page 25: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

This gives you aScreen like this

Click to createA transformationFor the reply

Page 26: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

Create New Mapper Fileand use the sugggestedname

Drag tns0:SetEmailForCustomerElementto imp1:Customer

Page 27: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

Use the AutomapFacility to make theTransformation

Click ’OK’Click

Page 28: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 29: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 30: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 31: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Define Routing for EmailRoutingService

We now haveDefined theEmailRoutingService

The result shouldLook like this

Close the EmailRoutingServiceEditor Window

Page 32: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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’

Page 33: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 34: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Couple the IC Adapter Inbound Routing Service

Open the ESB Console

Click to refreshthe services

Page 35: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Couple the IC Adapter Inbound Routing Service

The CustomerService System appearsand the EmailService and the EmailRoutingService

within it

Click ’EmailRoutingService’ to see the flow

Page 36: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

IC Adapter Inbound Routing ServiceClick on the routing service

Page 37: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Couple the IC Adapter Inbound Routing Service

Click on ’Routing Rules’

Click on

Page 38: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Couple the IC Adapter Inbound Routing Service

Find and Select theEmailRoutingServiceOperation routeNewCustomer

Click ’Select’...

Click

Page 39: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 40: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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...

Page 41: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

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

Page 42: Oracle ESB ESB Integration to Oracle Interconnect through IC Adapter Oracle Integration Product Management

Test the Case

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

This concludes theIC Adapter and ESBIntegration demo case