You are on page 1of 102

November 14th, 2012

10:30-11:15
Room vt445

Hands-On with Oracle SOA


Cristian Durca Ahmed Aboulnaga
Technical Architect Technical Director
IPN Web, Inc. IPN Web, Inc.
Agenda

1. Introduction

2. Understanding Oracle Integration Products

3. Our “Integration” Use Case

4. Implementing the Solution

5. Summary

Slide 2 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
INTRODUCTION

Slide 3 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
About Me

Cristian Durca
 17+ years of integration and Oracle middleware
experience
 Emphasis on integration solutions, leveraging
technologies that include SOA Suite, AIA, BAM, OSB,
OSR, OWSM, ODI, OEG, Coherence, ExaLogic,
webMethods, and more

Slide 4 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
About Me

Ahmed Aboulnaga
 15+ years of Oracle middleware experience
 Focus on Oracle Fusion Middleware, with emphasis on
SOA, portal, and collaboration technologies
 OCE (SOA Architect, SOA Foundation Practitioner) and
OCA (Application Server)
 Author / Presenter / Blogger
 President of WMOUG

Slide 5 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
IPN Web at a Glance

 Founded in 2004
 Headquartered in the Washington DC area
 Specializes in Oracle Fusion Middleware implementations
 Certified staff in multiple disciplines (OCE, OCP, OCA, PMP)

www. .com

Slide 6 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
UNDERSTANDING
ORACLE INTEGRATION PRODUCTS

Slide 7 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Oracle Fusion Middleware

Slide 8 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Oracle Fusion Middleware

 Oracle Fusion Apps


 Oracle E-Business Suite
 Oracle JD Edwards
 Oracle PeopleSoft
 Oracle Siebel
 Oracle Retail
 More…

Slide 9 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Oracle Fusion Middleware

 Oracle Database
 Oracle MySQL

Slide 10 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Oracle Fusion Middleware

 Oracle Enterprise Linux


 Oracle Solaris
 Oracle VM
 Oracle Exadata/Exalogic
 Oracle SPARC
 Oracle Storage Products

Slide 11 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Oracle Fusion Middleware

 Oracle Fusion Middleware

Slide 12 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Oracle Integration Products

 Oracle SOA Suite


 Oracle Service Bus (OSB)
 Oracle Data Integrator (ODI)
 Oracle Web Services Manager (OWSM)
 Oracle Application Integration Architecture (AIA)
 Oracle Business Activity Monitoring (BAM)
 Oracle GoldenGate
 Oracle Enterprise Repository (OER)
 Oracle Enterprise Gateway (OEG)
 Oracle Service Registry (OSR)
 Oracle B2B Integration
Slide 13 of 102 © IPN Web, Inc. 2011
2012 All rights reserved.
Oracle Integration Products

 Oracle SOA Suite


 Oracle Service Bus (OSB)
 Oracle Data Integrator (ODI)
 Oracle Web Services Manager (OWSM)
 Oracle Application Integration Architecture (AIA)
 Oracle Business Activity Monitoring (BAM)
 Oracle GoldenGate
 Oracle Enterprise Repository (OER)
 Oracle Enterprise Gateway (OEG)
 Oracle Service Registry (OSR)
 Oracle B2B Integration
Slide 14 of 102 © IPN Web, Inc. 2011
2012 All rights reserved.
 Transforms complex architectures into agile integration
networks by connecting, mediating, and managing
interactions between services and applications
 Delivers low-cost, standards-based integration for mission
critical SOA environments where extreme performance
and scalability are requirements

Slide 15 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
 A comprehensive and easy-to-use solution for policy
management and security of service infrastructure
 Provides visibility and control of the policies through a
centralized administration interface offered by Oracle
Enterprise Manager

Slide 16 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
 A comprehensive, hot-pluggable software suite to build,
deploy and manage Service-Oriented Architectures
(SOA)
 Unified application development tooling and end-to-end
lifecycle management

Slide 17 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
 Gives business executives the ability to monitor their
business services and processes in the enterprise
 Correlate KPIs down to the actual business process
themselves
 Allows the ability to change business processes quickly or
to take corrective action if the business environment
changes

Slide 18 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
OUR “INTEGRATION” USE CASE

Slide 19 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
High Level Flow of Use Case

OWSM
Policy

Web
Application Database
OSB Proxy SOA Suite Table 1
Service Composite &
Table 2
Mobile
Application

BAM
Reports

Slide 20 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Why OSB?

 Consider using OSB as your entry (and/or exit) points


 OSB is lightweight, and easily supports throttling and caching
 OSB proxy services are usually exposed as web services

OSB Proxy
Service

OSB Proxy
Web Service
Application
OSB Proxy
Service
Mobile
Application OSB Proxy
Service

Slide 21 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Why OWSM?

 Install the Oracle Service Bus OWSM Extension to provide


support for WS-Security
 Attach the policy “oracle/wss_username_token_service_policy”
 Client must supply username and password in the SOAP
header
<soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<wsse:Security soap:mustUnderstand="1">
<wsse:UsernameToken> OWSM
<wsse:Username>myusername</wsse:Username> Policy
<wsse:Password>mypassword</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soap:Header> OSB Proxy
Service

Slide 22 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Why SOA Suite?

 Incoming payload includes:


 Item Number
 Quantity
 Dollar Amount
 Type Flag (‘M’ for mobile, ‘W’ for web)

 Use BPEL for complicated flows and/or orchestration


(e.g., calculate tax)
 Use Mediator to route to the correct table based on the flag
in the payload SOA Suite Composite

BPEL Mediator
(calculate tax) (route)

Slide 23 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Why BAM?

 BAM is essentially a reporting tool


 Designed to capture in-flight transactions and report on
them in real-time
 Does not impact performance of integration flow
 In our use case, publish total dollar amounts of web
orders to BAM for management reporting
SOA Suite
Composite

BAM
Reports

Slide 24 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Bringing it all together…

OWSM
Policy

Web
Application Database
OSB Proxy SOA Suite Table 1
Service Composite &
Table 2
Mobile
Application

BAM
Reports

The Oracle Integration Layer

Slide 25 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
IMPLEMENTING THE SOLUTION

Slide 26 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create XML Schema

 Create the Order.xsd schema file

 An XML schema describes the structure of an XML message

<?xml version="1.0" encoding="ISO-8859-1" ?>


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Order">
<xs:complexType>
<xs:sequence>
<xs:element name="OrderType" type="xs:string"/>
<xs:element name="ItemNumber" type="xs:string"/>
<xs:element name="Quantity" type="xs:positiveInteger"/>
<xs:element name="Price" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

Slide 27 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
OWSM
Policy

Web
Application Database
OSB Proxy SOA Suite Table 1
Service Composite &
Table 2
Mobile
Application

BAM
Reports

Slide 28 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create the backend database tables

 These tables represent the backend for our order system

CREATE TABLE web_orders (


item_number VARCHAR2(10),
quantity NUMBER,
dollar_amount NUMBER(7,2)
);

CREATE TABLE mobile_orders (


item_number VARCHAR2(10),
quantity NUMBER,
dollar_amount NUMBER(7,2)
);

Slide 29 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
OWSM
Policy

Web
Application Database
OSB Proxy SOA Suite Table 1
Service Composite &
Table 2
Mobile
Application

BAM
Reports

Slide 30 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create the BAM Data Objects

 BAM Data Objects are essentially tables


 Used to store data that is published to BAM

Slide 31 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create the BAM Data Objects

 BAM Data Objects are essentially tables


 Used to store data that is published to BAM

Slide 32 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create the BAM Data Objects

Slide 33 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
OWSM
Policy

Web
Application Database
OSB Proxy SOA Suite Table 1
Service Composite &
Table 2
Mobile
Application

BAM
Reports

Slide 34 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
SOA Suite Composite
OrderType = ‘W’
BPEL Mediator WebOrders Table
(calculate tax) (route)
MobileOrders Table
Price x 1.05 OrderType = ‘M’

BAM
Data Object

Slide 35 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create SOA composite

 A SOA composite application can consist of multiple


components, such as:
 BPEL component
 Mediator component
 Database Adapters
 BAM Adapter

 Open up JDeveloper 11g


 Create a new SOA project

Slide 36 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create a SOA project

Slide 37 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create a SOA project

Slide 38 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create Database Adapters for each table

 Adapters are used for easily referencing technologies


such as databases, file systems, FTP servers, JMS, and
so forth
 The Database Adapter hides the underlying
implementation of the connectivity of the database, so
that the SOA developer can focus on building
integrations
 Simply drag the Database Adapter to the external
references pane

Slide 39 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Drag Database Adapter to pane

Slide 40 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Use Database Adapter configuration wizard

 Provide a name for the reference

Slide 41 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Choose a database to connect to

Slide 42 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Select table and columns

 Select the table name and columns from the database

Slide 43 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Select type of operation on this table

Slide 44 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Database Adapters created in JDeveloper

Slide 45 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create SOA Mediator component

 Create a Mediator component


 Mediator’s strengths are in transformation and routing
 Route to the Database Adapters that we just created…
…based on a filter on the ‘OrderType’ flag

Slide 46 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create SOA Mediator component

 Create a name for the Mediator component

Slide 47 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create SOA Mediator component

 Use the XSD we created earlier as our message input

Slide 48 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create a WSDL for the Mediator component

Slide 49 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create a routing rule

Slide 50 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Select the Database Adapter

 Select the Database Adapter we had created earlier

Slide 51 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create a filter expression

Slide 52 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create a filter expression

Slide 53 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create a transformation

Slide 54 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Map the XML to the Database Adapter object

Slide 55 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
How the composite looks like so far

Slide 56 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create SOA BPEL component

 BPEL is used for orchestration or complicated logic


 Simply drag the “BPEL Process” to the composite pane

Slide 57 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create SOA BPEL component

Slide 58 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Link the BPEL to the Mediator

Slide 59 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create an ‘Assign’ activity

Slide 60 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Multiply the price

Slide 61 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Multiply the price

Slide 62 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Map rest of BPEL elements to Mediator object

Slide 63 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create an ‘Assign’ activity for the response

Slide 64 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create an ‘Assign’ activity for the response

Slide 65 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create BAM Adapter

 Similar to the Database Adapter, drag the BAM Adapter


 Will query the BAM server and list all available data objects

Slide 66 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create BAM Adapter

Slide 67 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create BAM Adapter

Slide 68 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Map BPEL object to BAM object

Slide 69 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
How the final SOA composite looks like

Slide 70 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Deploy SOA composite

 Right-click on the composite name to deploy to SOA server


 URL becomes:
http://soadev:8001/soa-infra/services/default/ProcessOrder/calculatetax_client_ep?WSDL

Slide 71 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
OWSM
Policy

Web
Application Database
OSB Proxy SOA Suite Table 1
Service Composite &
Table 2
Mobile
Application

BAM
Reports

Slide 72 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
OWSM Policy

OSB Project

Proxy Business SOA


Service Service Composite
http://soadev:7001/ProcessOrderProxy/... http://soadev:8001/soa-infra/...

Slide 73 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create OSB project

 The OSB server is on a separate managed server


 Import the WSDL of the SOA composite
 Create a Business Service (the link to the SOA composite)
 Create a Proxy Service (the exposed interface)
 Secure the Proxy Service with an OWSM Policy

Slide 74 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create OSB project

Slide 75 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Import the SOA composite WSDL

Slide 76 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Import the SOA composite WSDL

Slide 77 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create OSB Business Service

Slide 78 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create OSB Business Service

Slide 79 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create OSB Proxy Service

Slide 80 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Create OSB Proxy Service

Slide 81 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
OWSM
Policy

Web
Application Database
OSB Proxy SOA Suite Table 1
Service Composite &
Table 2
Mobile
Application

BAM
Reports

Slide 82 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Click on Proxy Service

Slide 83 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Attach OWSM Policy to OSB Proxy Service

Slide 84 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
To identify exposed URL

Slide 85 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Final OSB exposed WSDL

 The exposed WSDL for the OSB Proxy Service:


http://soadev:7001/ProcessOrderProxy/ProcessOrderPS?wsdl

 This is the WSDL that the web/client applications will invoke

Slide 86 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
OWSM
Policy

Web
Application Database
OSB Proxy SOA Suite Table 1
Service Composite &
Table 2
Mobile
Application

BAM
Reports

Slide 87 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Test with soapUI

 Use soapUI to test the WSDL

Slide 88 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Observe authentication failure

 Seems to be some security error


 Valid error… no username/password provided in payload!

Slide 89 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Test with security token in SOAP header

 With authentication info in header, we get our ‘Done’ response

Slide 90 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Observe instance in EM Console

Slide 91 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
View instance flow

 Clicking on the instance ID shows a successful flow


 Data only inserted to the ‘WebOrders’ table as expected

Slide 92 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
View Mediator instance details

Slide 93 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Confirm data in database

 Querying the database table confirms this

Slide 94 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Confirm data in BAM Data Object

 Data also published to BAM!


 Can now create a report to query this Data Object

Slide 95 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
SUMMARY

Slide 96 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Summary
1. Create an XML Schema

2. Create the database tables

3. Create the BAM Data Object

Slide 97 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Summary
4. Create the SOA composite with JDeveloper

a. Open up JDeveloper 11g

b. Create a SOA project

c. Create 2 Database Adapter services

d. Create a Mediator component


i. Create a web service interface using the XSD file
ii. Create 2 routing rules to the 2 database services
iii. Use a filter expression on the 'OrderType' element

e. Create a BPEL component


i. Link the BPEL component with the Mediator component
ii. Map the input of the BPEL to the input of the Mediator
iii. But multiple the price by 1.05
iv. Create a BAM Adapter to the BAM Data Object
v. Map the input of the BPEL to the BAM Adapter

Slide 98 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Summary
5. Deploy the SOA composite

a. Get the WSDL of the SOA composite

6. Create an OSB project

a. Create a Business Service using this SOA WSDL

b. Create a Proxy Service as the OSB interface

c. Secure the Proxy Service with an OWSM Policy

7. Test using soapUI

Slide 99 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Take Aways

 Understand where each product should be aligned


 There is some overlap between products
 There is no one-size fits all architecture

 Understand the difference between and usage of OSB,


OWSM, BAM, and SOA Suite
 Observe first hand a walkthrough demo:
 OSB used as a passthrough, but has other benefits not demo’ed here
 OWSM provides a mechanism to attach security policies to a service
 BPEL used for orchestration
 Mediator used for routing

Slide 100 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Final Thoughts

 All these products are provided as part of a single Oracle


SOA Suite license, so take advantage of them!
 You can use any combination of OSB, BPEL, or Mediator
depending on your needs

Slide 101 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.
Contact Information

Cristian Durca
Technical Architect
cristian.durca@ipnweb.com

Ahmed Aboulnaga
Technical Director
ahmed.aboulnaga@ipnweb.com

Slide 102 of 102 © IPN Web, Inc. 2011


2012 All rights reserved.

You might also like