Вы находитесь на странице: 1из 302

Oracle Service Bus 11g:

Design and Integrate Services





Student Guide
D68256GC11
Edition 1.1
February 2012
D76029
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Disclaimer

This document contains proprietary information and is protected by copyright and
other intellectual property laws. You may copy and print this document solely for your
own use in an Oracle training course. The document may not be modified or altered
in any way. Except where your use constitutes "fair use" under copyright law, you
may not use, share, download, upload, copy, print, display, perform, reproduce,
publish, license, post, transmit, or distribute this document in whole or in part without
the express authorization of Oracle.

The information contained in this document is subject to change without notice. If you
find any problems in the document, please report them in writing to: Oracle University,
500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not
warranted to be error-free.

Restricted Rights Notice

If this documentation is delivered to the United States Government or anyone using
the documentation on behalf of the United States Government, the following notice is
applicable:

U.S. GOVERNMENT RIGHTS
The U.S. Governments rights to use, modify, reproduce, release, perform, display, or
disclose these training materials are restricted by the terms of the applicable Oracle
license agreement and/or the applicable U.S. Government contract.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names
may be trademarks of their respective owners.



Author
Swarnapriya Shridhar
Technical Contributors and
Reviewers
Sandeep Agarwal
Deb Ayers
Pradeep Bollineni
Satish Duggana
Rakesh Gowda
Amit Jhunjhunwala
Yosuke Katsuki
Jay Kasi
Pankaj Khandelwal
Takyiu Liu
Mary Peek
Rakesh Saha
David Shaffer
Matthew Slingsby
Editors
Smita Kommini
Aju Kumar
Rashmi Rajagopal
Publisher
Veena Narasimhan
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s


iii
Contents




1 Introduction
Target Audience and Prerequisite Skills 1-2
Course Objectives 1-3
Course Schedule 1-4
Additional Course Materials 1-5
Course Practices 1-6
Course Environment 1-7
Classroom Guidelines 1-8
For More Information 1-9
Class Introductions 1-10

2 Introduction to Oracle Service Bus
Objectives 2-2
Getting Started 2-3
Enterprise Challenges 2-4
Point-to-Point Integration 2-5
Enterprise Application Integration 2-6
Service-Oriented Architecture (SOA) 2-7
Service-Oriented Architecture: Definition 2-8
Integrating Solutions and Benefits with SOA 2-9
SOA and Services 2-10
Implementing SOA Strategy 2-11
SOA Reference Architecture 2-12
SOA Reference Architecture: Service Consumers 2-14
SOA Reference Architecture: Service Classifications 2-15
SOA Reference Architecture: Service Providers 2-16
Data Services Layer 2-17
Connectivity Services Layer 2-18
Business Services Layer 2-19
Business Process Services Layer 2-20
Presentation Services Layer 2-21
Infrastructure Services 2-22
SOA Implementation Challenge 2-24
Service Sprawl 2-25
Solution to Service Sprawl 2-26
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s


iv
Oracle Service Bus 2-27
Key Features of Oracle Service Bus 2-28
Oracle Service Bus as a Message Broker 2-29
Location Transparency 2-31
Dynamic Routing 2-32
Transformations 2-33
Service Orchestration 2-34
Message Enrichment 2-35
Security 2-36
Service-Level Agreements 2-38
OSB Architecture and Functional Features 2-39
OSB Architecture 2-40
OSB Functional Features 2-41
Summary 2-43
Practice 2 Overview: Introduction to Oracle Service Bus 2-44

3 Message Flow
Objectives 3-2
Service Bus Architecture 3-3
Oracle Service Bus Console 3-5
Projects and Resources 3-6
OSB Projects 3-7
OSB Resource Types 3-8
Business Services 3-9
Creating a Business Service 3-10
Proxy Services 3-11
Creating a Proxy Service 3-12
Difference Between Binding and Port 3-13
Quiz 3-14
Message Context Model 3-15
Using Context Variables 3-16
Predefined Context Variables 3-17
Predefined Context Variables: Descriptions 3-18
Message-Related Variables 3-20
$header Variables 3-21
$body Variables 3-22
$body Binary Content 3-23
$body Java Content 3-24
$attachments Variable 3-25
$body and RPC 3-27
$fault Variable 3-28
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s


v
$inbound and $outbound Variables 3-29
$operation Variable 3-30
User-Defined Context Variables 3-31
Variables and Types 3-32
Inbound Message Dispatching 3-33
Outbound Message Dispatching 3-34
Quiz 3-35
Message Flow Components 3-36
Branching 3-38
Branching Types 3-39
Conditional Branch 3-40
Operational Branch 3-41
Expression Editor 3-42
Variable Structures 3-43
Namespace Definitions 3-44
XQuery Functions 3-45
Quiz 3-46
Summary 3-49
Practice 3 Overview: Message Flow 3-50

4 Message Flow Actions
Objectives 4-2
Message Flow Design 4-3
Route Node 4-4
Route Node Communication Action: Dynamic Routing 4-5
Route Node Communication Action: Routing 4-6
Route Node Communication Action: Routing Table 4-7
Route Node Flow Control Action: If-Then 4-8
Routing Table Versus Conditional Branching 4-9
Quiz 4-10
Stage Node 4-11
Stage Node Communication Action: Dynamic Publish 4-12
Stage Node Communication Action: Publish 4-13
Stage Node Communication Action: Publish Table 4-14
Stage Node Communication Action: Routing Options 4-15
Stage Node Communication Action: Service Callout 4-16
Stage Node Communication Action: Transport Headers 4-18
Stage Node Flow Control Actions 4-20
Quiz 4-21
Stage Node Message Processing Actions 4-22
Message Format Language 4-24
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s


vi
Using MFL 4-25
Quiz 4-26
Stage Node Reporting Actions 4-27
Oracle XQuery Mapper 4-29
Mapping Data 4-30
Creating a Transformation 4-31
Mapping a Transformation 4-32
Using XQuery File in OSB 4-33
Custom XPath Functions 4-34
Creating a Custom XPath Function 4-35
Registering a Custom Function 4-36
Summary 4-37
Practice 4 Overview: Message Flow Actions 4-38

5 Message Flow Best Practices
Objectives 5-2
Split-Join Pattern 5-3
Split-Join Order: Example 5-4
Split-Join Patterns 5-5
Creating a Split-Join Configuration 5-6
Receive Node 5-7
Reply Node 5-8
Parallel Node 5-9
Assign Node 5-10
Invoke Service Node 5-12
Input and Output Variables 5-13
Exporting the Split-Join Flow 5-14
Split-Join Flow Creation Process 5-15
Quiz 5-16
Dynamic Routing 5-17
Dynamic Routing Techniques 5-18
Technique 1 5-19
Sample XML File 5-20
Dynamic Routing Action 5-21
Technique 2 5-22
Summary 5-23
Practice 5 Overview: Message Flow Best Practices 5-24

6 Transports in Oracle Service Bus
Objectives 6-2
SOA-DIRECT Transport 6-3
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s


vii
Features of SOA-DIRECT Transport 6-4
Synchronous Invocation of SOA Composite Components 6-5
Synchronous Invocation from a SOA Composite 6-6
Asynchronous Invocation of a SOA Composite 6-8
Asynchronous Invocation from a SOA Composite 6-9
Quiz 6-10
JCA Transport 6-11
Features of the JCA Transport 6-12
Adapters Supported by JCA Transport 6-13
JCA Adapter Framework 6-14
General Configuration of JCA Adapter 6-15
Representational State Transfer (REST) 6-17
OSB Support for REST 6-19
Example 6-20
Standard Proxy Service: Example 6-21
REST-ful Proxy Service: Example 6-23
Quiz 6-28
Summary 6-29
Practice 6 Overview: Transports in Oracle Service Bus 6-30

7 Debugging with Oracle Service Bus
Objectives 7-2
Error Handler Pipelines 7-3
Error Handlers 7-4
$fault Variable 7-5
Error Codes 7-6
Reply Action 7-8
Reply Action in OSB Console 7-9
Transport Errors with Service Callouts 7-10
Error Code BEA-382502 7-11
SOAP Faults with Service Callouts 7-12
Unexpected Responses and Service Callouts 7-13
Resume Action 7-14
Quiz 7-15
Validation and Error Scenario 7-17
Validate Action 7-18
Quiz 7-19
Reporting Actions 7-20
Oracle Service Bus Reporting Framework 7-21
Reporting Framework: Diagrammatic Representation 7-22
Report Action 7-24
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s


viii
Log Action 7-26
Alert Action 7-27
Quiz 7-28
OSB Debug Files 7-29
OSB Debug Flags 7-30
Configuration Framework Debug Flags 7-32
Summary 7-33
Practice 7 Overview: Debugging with Oracle Service Bus 7-34

8 Introduction to Oracle Service Bus Security
Objectives 8-2
Introduction to Oracle Service Bus Security 8-3
Inbound and Outbound Security 8-4
Identity Propagation in Oracle Service Bus 8-6
Example: Authentication with a Username Token 8-7
Securing Oracle Service Bus with Oracle Web Services Manager 8-9
Configuring OWSM Keystore by Using Enterprise Manager Console 8-11
Credential Store Framework 8-12
Configuring the OWSM CSF by Using Oracle Enterprise Manager 8-13
Web Services Policy 8-14
Using Security Assertion Markup Language (SAML) for Authentication 8-15
Quiz 8-16
Summary 8-18
Practice 8 Overview: Introduction to Oracle Service Bus Security 8-19

Appendix A: Service Bus Concepts
Objectives A-2
Introduction to Service Bus Technology A-3
Benefits of a Service Bus A-4
Service Bus Technologies A-5
Web Services Description Language A-6
Simple Object Access Protocol A-7
Universal Description, Discovery, and Integration (UDDI) A-8
XML Schema A-9
XPath A-10
XQuery A-11
Extensible Stylesheet Language Transformations A-12
Summary A-13

Appendix B: Transports
Objectives B-2
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s


ix
SB Transport B-3
EJB Transport B-4
JEJB Transport B-5
Local Transport B-6
WS Transport B-7
MQ Transport B-8
HTTP and Poll-Based Transports B-9
Oracle Data Service Integrator Transport B-10
Summary B-11

Appendix C: Delivery Methods
Objectives C-2
Quality of Service C-3
Delivery Guarantees C-4
Delivery Guarantee Types C-5
Delivery Guarantee Rules C-6
Overriding the Default Element C-8
Reliable Messaging Support C-9
Configuring Delivery Behavior C-11
HTTP(S) Quality of Service Success C-12
Handling Unreliable Transports C-13
Threading Model C-14
Summary C-15
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s




S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Introduction
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 1 - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Target Audience and Prerequisite Skills
This course is directed at:
SOA architects
Technical architects
Application developers
Prerequisite skills include:
Web Services experience
XML programming experience
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 1 - 3


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Course Objectives
After completing this course, you should be able to:
Describe the Oracle Service Bus (OSB) architecture and
functional layers
Create OSB resources
Enrich, route, and validate messages within OSB
Use some of the common OSB transports
Describe the sequence involved in Message Level Security
Explain the process of securing OSB with Oracle Web
Services Manager (OWSM)
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The class schedule might vary according to the pace of the class. The instructor will provide
updates.
At the end of the course, the instructor will facilitate a feedback session that includes a written
questionnaire.
Oracle University uses your feedback to improve our training programs. We appreciate your
honest evaluation.
Oracle Service Bus 11g: Design and Integrate Services 1 - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Course Schedule
Session Lesson
Day 1
1: Course Introduction
2: Introduction to Oracle Service Bus
3: Message Flow
Day 2
4: Message Flow Actions
5: Message Flow Best Practices
Day 3
6: Transports in Oracle Service Bus
7: Debugging with Oracle Service Bus
8: Introduction to Oracle Service Bus Security
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Activity Guide contains the practices for the course.


Appendix A contains basic concepts such as the key benefits of a service bus and
fundamental technologies on which a Service Bus is built.
Appendix B contains information about different transports that work with OSB.
Appendix C contains information about delivery methods that are used with OSB.
Oracle Service Bus 11g: Design and Integrate Services 1 - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Additional Course Materials
Activity Guide
Appendixes
A: Service Bus Concepts
B: Transports
C: Delivery Methods
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 1 - 6


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Course Practices
Each core topic is reinforced with a hands-on practice.
Optional topics and practices are performed at the
instructors discretion and if time permits.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In this course, the following products are used for the practices:
Oracle WebLogic Server 11g R1 (10.3.4) + Coherence + OEPE
Oracle Service Bus 11g R1(11.1.1.4)
Oracle SOA Suite 11g (11.1.1.4)
Oracle JDeveloper 11g (11.1.1.4)
Oracle Database 10g Express Edition (Universal)
Oracle Service Bus 11g: Design and Integrate Services 1 - 7
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Course Environment
The software is preinstalled and configured on each student
machine.
Instructor machine
Student
machine 1
Student
machine 2
Student
machine 3
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 1 - 8


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Classroom Guidelines
The instructor starts each session promptly at the
scheduled time.
Ask questions, but be respectful of the topic at hand and
the interest of other students.
Ensure that cell phones and pagers are silent.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 1 - 9


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
For More Information
Topic Website
Education and Training
http://education.oracle.com
Product Documentation
http://www.oracle.com/technology/documentation
Product Downloads
http://www.oracle.com/technology/software
Product Articles
http://www.oracle.com/technology/pub/articles
Product Support
http://www.oracle.com/support
Product Forums
http://forums.oracle.com
Product Tutorials
http://www.oracle.com/oll
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 1 - 10


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Class Introductions
Briefly introduce yourself:
Name
Title or position
Company
Web Services and XML experience
Reasons for attending
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Introduction to Oracle Service Bus
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 2 - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to:
Describe Service-Oriented Architecture (SOA)
Explain the SOA Reference Architecture and its different
layers
Identify the core concepts of Oracle Service Bus
Explain the role and features of Oracle Service Bus
Identify the functional features of Oracle Service Bus
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The dialog in the slide identifies the challenges that enterprises face when trying to create an
integration strategy.
Oracle Service Bus 11g: Design and Integrate Services 2 - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Getting Started
IT Manager: Our team has developed a new application
that needs to be integrated with the existing system. We
are thinking of adopting a point-to-point integration
strategy.
Architect: Before we decide on the point-to-point
strategy, we need to understand if that methodology is
the best suited for our organization.
IT Manager: Great idea! Do you have information to share?
Architect: Yes, I do.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Enterprises use different custom-built and off-the-shelf packaged applications to run their
business processes. Applications are integrated to share information among themselves and
to incorporate information from existing applications. Traditional application development and
integration approaches have been neither flexible nor standards-based to facilitate an agile
enterprise IT environment.
In large enterprises, application development means interacting with business data from one
or more sources or other applications. Application integration cannot be implemented without
application development tasks that include developing and assembling components,
connecting components to back-end systems, implementing process flow and workflow,
developing the user interface, testing, and debugging.
Two of the most common application integration methodologies are:
Point-to-point integration methodologies by using APIs, proprietary messages, and
custom integration links
Enterprise Application Integration (EAI) based on message bus (a message bus
specializes in transporting messages between applications) or middleware
Oracle Service Bus 11g: Design and Integrate Services 2 - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Enterprise Challenges
Application development and integration issues
Lack of flexibility
Not based on standards
Project costs and long duration
Traditional methodologies
Point-to-point
Enterprise Application Integration
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Point-to-point integration involves:


Proprietary messages and APIs
Custom integration links
Duplication of effort
Lack of open standards
Tight coupling of data and implementation
Skill set issues
Projects lasting months
Cost (skill, time, and products)
Operational policies embedded in application
Lack of agility
Slow response by IT to business changes
In the point-to-point (or peer-to-peer) integration methodology, applications are integrated with
other applications as needed. The interconnections shown in the slide can be built with web
services as well. But that does not mean that the peer-to-peer implementation is SOA based;
it still is not loosely coupled and intermediary based, and it lacks a shared infrastructure.
Note: CRM stands for Customer Relationship Management.
Oracle Service Bus 11g: Design and Integrate Services 2 - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Point-to-Point Integration
Packaged CRM
Packaged ERP
Mainframe
App Server
CRM Application
ERP Application
Custom
Application
EJB Application
EAI
Client Tier
Custom
Logic
Custom
Logic
Custom
Logic
Custom
API
Custom
API
Custom
API
Custom
API
Custom
API
Custom
API
Custom
API
Custom
API
Client
Application
Client
Application
Client
Application
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Because point-to-point integration is complex, costly, and difficult to manage, the Enterprise
Application Integration (EAI) method was introduced. EAI is based on a message broker or
middleware, where the connectivity between each application and the message bus is
developed by using proprietary bus APIs and an Application Platform Suite (APS).
The following are the disadvantages of these approaches:
Custom or proprietary integration between the message bus and each application is
required.
Different proprietary data formats are involved at each integration point.
Each application is still tightly coupled to the message bus.
The applications need to know the inner workings of the other applications with which
they are integrated.
The challenge of accessing, integrating, and transforming data (enterprise information
integration) has largely been left to developers to perform by using manual coding.
The lack of standards and the architectural limitationsin addition to the hefty costs of
traditional EAI projectshave resulted in the search for an alternative integration solution that
can resolve these deficiencies.
Note: JAM stands for Java Adapter for Mainframe.
Oracle Service Bus 11g: Design and Integrate Services 2 - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Enterprise Application Integration
Packaged CRM Packaged ERP
Mainframe App Server
CRM
Application
ERP
Application
Custom
Application
EJB
Application
Client Tier
VB
Application
Java
Application
Web
Application
Custom
API
JAM API
RMI
Message Bus or Middleware
Custom
API
Proprietary Middleware API
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The manager wants to understand the concepts and benefits of SOA. So, you start with its
definition so that you have a common and shared understanding of what it represents.
Oracle Service Bus 11g: Design and Integrate Services 2 - 7
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Service-Oriented Architecture (SOA)
IT Manager: I understand your concerns. So what is an
alternative integration solution to address these
limitations?
Architect: Adapting to a service-centric integration is
the best alternative. This can be achieved if we adopt
Service-Oriented Architecture (SOA).
IT Manager: Ive heard of SOA. Can you give me its
conceptual definition?
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

SOA can be defined as a paradigm for organizing and utilizing distributed capabilities that
may be under the control of different ownership domains.
In computing, SOA provides methods for systems development and integration, where
systems group functionality around business processes and package these as interoperable
services. An SOA infrastructure allows different applications to exchange data with one
another as they participate in business processes.
Oracle Service Bus 11g: Design and Integrate Services 2 - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Service-Oriented Architecture: Definition
Service-Oriented Architecture is an IT strategy that organizes
the discrete functions contained in enterprise applications into
interoperable, standards-based services that can be combined
and reused quickly to meet business needs.
Business
strategy
SOA
IT
strategy
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Aligning IT with discrete business functions:


Results in rapid development and more reliable delivery of new and enhanced business
services
Improves productivity, agility, and speed for both business and IT
Enables IT to deliver services faster and align closer with business
Enables the business to respond more quickly and deliver an optimal user experience
Masks the underlying technical complexity of the IT environment
The benefits of Service-Oriented Architecture are:
Reusability: The existing business functionality in an application can be reused to meet
new business requirements. In addition, new services should be designed with
reusability in mind as determined by their usage patterns within the business domain.
However, not all services need to be reusable or dependent on the business
requirement.
Interoperability: Communication between services and the business process is not
dependent on the platform and is standards enabled. The services are also not tightly
coupled to the application.
Scalability: Applications are flexible to accommodate changing business requirements.
Cost efficiency: SOA is highly cost efficient because integrating the business
resources is standards based.
Oracle Service Bus 11g: Design and Integrate Services 2 - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Integrating Solutions and Benefits with SOA
SOA
Offers faster business
response time
Improves business
agility
Masks underlying
technical complexity
Aligns IT with
business
Benefits
Reusability Interoperability Scalability
Cost
Efficiency
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A service is a piece of self-contained business functionality. The functionality can be as


simple as storing customer data or as complex as a business process for a customers order.
Services form the basic building blocks for a SOA implementation. They perform work based
on business interactions and requirements.
Because services concentrate on the business value of an interface, they bridge the
businessIT gap. Services interact by exchanging messages with other clients and other
services. In Oracle SOA Suite 11g, services describe their interface by using Web Services
Description Language (WSDL) that specifies:
Operations that may be executed
Message structures for communicating the required data for each operation. Message
structures are based on types expressed in an XML Schema Definition (XSD).
Independence is a fundamental aspect of services and of SOA as a whole. Loose coupling
frees a service from immediate ties to others. This makes it much easier to realize reuse. In
addition, when there are fewer dependencies, modification to or faults in one system will have
fewer effects on other systems.
Oracle Service Bus 11g: Design and Integrate Services 2 - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SOA and Services
Services are SOA building blocks.
SOA can be thought of as:
A collection of services on a network that communicate with
one another
A set of services that are loosely coupled with well-defined,
reusable, platform-independent interfaces
A higher level of application development
Services provide access to data, business processes, and
IT infrastructure, ideally in an asynchronous manner.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The essence of the dialog in the slide is the need for an SOA Reference Architecture.
Oracle Service Bus 11g: Design and Integrate Services 2 - 11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Implementing SOA Strategy
IT Manager: Okay. I understand that a service is the
fundamental building block for SOA. Is there a way to
create an architecture that can be used as a guide to
develop Service-Oriented Architectures?
Architect: Of course. The SOA Reference Architecture is
used as a blueprint to guide the enterprise toward SOA.
The SOA Reference Architecture helps group similar
services for both operational efficiency and design stability.
IT Manager: Can you explain how the SOA Reference
Architecture helps in classifying services?
Architect: Sure.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

An SOA Reference Architecture promotes consistency and interoperability by defining


enterprise-wide principles, guidelines, and patterns. It is a blueprint to guide the enterprise
toward SOA success by:
Establishing a strategy for architecting new SOA projects, leveraging existing projects
and legacy investments
Building in flexibility and manageability, and planning for change
Simplifying diverse, sometimes incompatible platforms and applications found in any
large enterprise
Transitioning toward a culture of reuse, team collaboration, and resource sharing
Determining best practices for standards and technology deployment
Migrating toward a two-to-three year view, achieving true convergence over time
Providing a communication tool for establishing a common understanding of SOA and
its core strategies throughout the enterprise
Oracle Service Bus 11g: Design and Integrate Services 2 - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SOA Reference Architecture
An SOA Reference Architecture is a blueprint or guide to
creating an SOA infrastructure implementation for a
business depending on the business needs.
The SOA Reference Architecture:
Defines the target architecture and the principles to be used
by an organizations architects to make architecture and
design decisions on their projects
Is a key component of an effective strategy to deliver the
benefits of SOA
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The architecture separates the users of enterprise functionality from the systems and
applications that provide that functionality, placing the infrastructure for services and service
delivery between them. The layers of services and their supporting infrastructure are referred
to as the innovation layer. This analogy expresses their role in driving change in the way that
IT is delivered. Existing applications, data, and middleware form the foundation from which
services are drawn. Supporting and formalizing the existing enterprise activities is an
important goal of a service-oriented infrastructure. Standards-based infrastructure services
provide a common basis for the deployment of all other types of service.
Note: The SOA architectural framework for an organization is selected from this reference
architecture based on business requirements. Not all components of the reference
architecture are needed.
Oracle Service Bus 11g: Design and Integrate Services 2 - 13
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SOA Reference Architecture
Composite Applications Web Apps Portals Mashups BPM Process Clients
Service Consumers and
Delivery Channels
Employees Customers Partners
Client
Apps
Partner
Apps
Non-Service-Enabled Assets Service-Enabled Assets
Messaging Adapters Custom APIs JDBC file://
Presentation Services Shared Portlets Multichannel Delivery
Business Processes System-Centric Workflow Human-Centric Workflow
Business Services Enrichment Custom/Atomic Business Services
Data Services Logical Data Model Data Aggregation/Synchronization
Connectivity Services System/Data Access Messaging Partner Integration
Service
Bus
Mediation
Service Registry
Service Repository
SOA Security
Infrastructure
SOA Monitor and
Event Manager
Infrastructure
Services
Shared Services and Infrastructure
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Service consumers include end users as well as applications that are users of SOA, but not
contributors of services. These include:
Applications that belong to another domain (for example, partner applications)
Complex event-processing systems that can invoke composite applications and services,
as a result of processing decisions
Oracle Service Bus 11g: Design and Integrate Services 2 - 14
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Composite Applications Web Apps Portals Mashups BPM Process Clients
Service Consumers and
Delivery Channels
Employees Customers Partners
Client
Apps
Partner
Apps
SOA Reference Architecture:
Service Consumers
Users of the enterprise functionality
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 2 - 15


A service classification is a logical grouping of services that meet specific needs and conform
to different subsets of standards or guidelines. The separate classifications potentially satisfy
different subsets of architectural principles and have their own specific constraints.
The different service classifications are:
Connectivity services
Data services
Business services
Business process services
Presentation services
Infrastructure services
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SOA Reference Architecture:
Service Classifications
Presentation Services Shared Portlets Multichannel Delivery
Business Processes System-Centric Workflow Human-Centric Workflow
Business Services Enrichment Custom/Atomic Business Services
Data Services Logical Data Model Data Aggregation/Synchronization
Connectivity Services System/Data Access Messaging Partner Integration
Service
Bus
Mediation
Service Registry
Service Repository
SOA Security
Infrastructure
SOA Monitor and
Event Manager
Infrastructure
Services
Shared Services and Infrastructure
Service classifications and infrastructure
requirements of Service-Oriented
Architecture
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Existing functionalities, from other parts of the enterprise or from external applications, can be
accessed securely via the service bus if the functionalities are exposed as services (service-
enabled assets). Thus, business functionality or data that was not previously accessible can
be shared and reused across the enterprise. There is no necessity for the connectivity
services to service enable the assets. On the contrary, the non-service-enabled assets
standardize the exposure of their functions to the other service classes that use the
connectivity services.
Oracle Service Bus 11g: Design and Integrate Services 2 - 16
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SOA Reference Architecture:
Service Providers
Non-Service Enabled Assets Service-Enabled Assets
Messaging Adapters Custom APIs JDBC file://
Presentation Services Shared Portlets Multichannel Delivery
Business Processes System-Centric Workflow Human-Centric Workflow
Business Services Enrichment Custom/Atomic Business Services
Data Services Logical Data Model Data Aggregation/Synchronization
Connectivity Services System/Data Access Messaging Partner Integration
Service
Bus
Mediation
Service Registry
Service Repository
SOA Security
Infrastructure
SOA Monitor and
Event Manager
Infrastructure
Services
Shared Services and Infrastructure
Assets that can be shared and reused
throughout the enterprise
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The data services layer contains the services that provide access to data obtained by the data
sources. Access can be in the form of read and write capabilities (all create, read, update, and
delete functions). The data services layer may contain processing logic required to handle
more complex write operations. For example, an update may involve data sources that
support only asynchronous write operations. Also, error handling logic may be required if a
data source is not available when a request occurs.
Because this service classification is responsible for decoupling data consumers from data
providers, the upstream consumers can legitimately assume a standardized information
model and request data without the need for knowledge of the underlying data sources.
After the data services are isolated, architectural principles such as Data is owned by the
enterprise are better supported, enabling accountability and stewardship across the
enterprise.
Oracle Service Bus 11g: Design and Integrate Services 2 - 17
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Data Services Layer
Characteristics:
Fine grained or
coarse grained
No business logic
Aggregation and
transformation
High reuse
Stateless
Configurable
S
h
a
r
e
d

s
e
r
v
i
c
e
s
Data
services
Logical data model Data aggregation Data synchronization
Messaging Adapters CustomAPIs JDBC
Partners
Non-service-enabled assets
Database Legacy Content Packaged
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The connectivity services layer provides a way to derive information from a diversity of
software suites, custom applications, and data sources deployed across the enterprise.
In general, an enterprise can have a long list of retrieval strategies, such as extract, transform,
and load (ETL); message-oriented middleware (MOM); object brokers; and data integration.
The role of the connectivity services layer is to integrate these different access strategies into
a single access gateway. The adoption curve leans toward a loosely coupled implementation,
which is more scalable and interoperable.
Conceptually, connectivity services is the lowest layer and provides a level of abstraction to
all kinds of data sources. Shared business services interact with connectivity services to pull
the desired content based on the request.
The focus of this layer is to provide a contractual relationship with legacy systems where
throughput, availability, and exception handling are complex. For this reason, one of the
specific roles of the connectivity services layer is to encapsulate legacy idiosyncrasies and
standardize the exposure of their functions to other service classifications, thus eliminating
complexity for the other layers.
Oracle Service Bus 11g: Design and Integrate Services 2 - 18
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Connectivity Services Layer
Characteristics:
Fine grained
No business
logic or
aggregation
High reuse
Stateless S
h
a
r
e
d

s
e
r
v
i
c
e
s
Connectivity
services
Messaging Adapters CustomAPIs JDBC
System access Messaging Data access Partner integration
Partners
Non-service-enabled assets
Database Legacy Content Packaged
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

As the enterprise begins to standardize and encapsulate the functionality of enterprise


information systems in services, opportunities begin to emerge to apply the same kinds of
concepts to core, discrete business functionality that is not necessarily tied to a given
information system. This functionality might include business functions such as rating and
billing, inventory availability, and employee scheduling. This functionality is fine-grained and
benefits the enterprise by being available in a standard way for use by people and
applications. In many respects, this is the simplest form of integration needed for the
enterprise.
Accordingly, this functionality meets the definition of a service and is classified as the shared
business services layer. This classification supports the common architectural principle of
creating a clear and distinct separation between the way data and legacy systems are
accessed and the way they are processed.
Oracle Service Bus 11g: Design and Integrate Services 2 - 19
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
S
h
a
r
e
d

s
e
r
v
i
c
e
s
Business Services Layer
Characteristics:
Coarse grained
Task oriented
Business
logic content
Simple or
complex
operations
Medium level of
reuse
Usually stateless
Business
services
Enrichment
Custom business
services
Atomic business
services
Messaging Adapters CustomAPIs JDBC
Partners
Non-service-enabled assets
Database Legacy Content Packaged
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Business process automation is an example of orchestration. For example, a service for


equity trade execution would involve orchestration: to place a trade, to wait for it to clear, and
to credit or debit accounts appropriately. Orchestration involves the preservation of the state
and several physical transactions.
Technological constraints necessitate the separation of business process services. In this
layer, you find a specific focus in the architecture on guidelines and constraints on the use of
business process techniques, which are not applicable to other layers of the reference
architecture.
Oracle Service Bus 11g: Design and Integrate Services 2 - 20
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Business Process Services Layer
Characteristics:
Coarse grained
Process oriented
Short or long
running
processes
Lower level of
reuse
Can be stateless
or stateful
S
h
a
r
e
d

s
e
r
v
i
c
e
s
Business process
services
System-centric
workflow
Human-centric
workflow
Messaging Adapters CustomAPIs JDBC
Partners
Non-service-enabled assets
Database Legacy Content Packaged
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Presentation services provide two general types of service (as shown in the slide). The first
provides information in a standardized form for aggregation by another system before delivery
to an end user (such as portlets and mashups). The second focuses on the transformation of
user data for delivery via different devices (such as mobile phones, Web TV, and games).
Oracle Service Bus 11g: Design and Integrate Services 2 - 21
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
S
h
a
r
e
d

s
e
r
v
i
c
e
s
Presentation Services Layer
Characteristics:
Coarse grained
Process oriented
Short or long
running
processes
Lower level of
reuse
Can be stateless
or stateful
Presentation
services
Shared portlets Multichannel delivery
Messaging Adapters CustomAPIs JDBC
Partners
Non-service-enabled assets
Database Legacy Content Packaged
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The focus of infrastructure services is to provide the foundational components and capabilities
required to address the following enterprise challenges:
Avoiding tight coupling (direct dependency) between services and the clients
Achieving a consistent data format and representation of the enterprise data entities
Discovering what services are available, where they reside, and what their capabilities
and semantics are
Managing, monitoring, and enforcing quality of service and service-level agreements
Supporting service versioning
Governing the service life cycle
Managing service assets, relationships, and models
Invoking services over heterogeneous transports by using different message brokering
capabilities
Managing security policy
Rationalizing entitlement capabilities and management
Oracle Service Bus 11g: Design and Integrate Services 2 - 22
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Infrastructure Services
S
h
a
r
e
d

s
e
r
v
i
c
e
s
Messaging Adapters CustomAPIs JDBC
Connectivity services
Data services
Business services
Business process services
Presentation services
Service
Bus
Service
repository
Service
registry
Monitor/
event manager
Security
Infrastructure
services
Partners
Non-service-enabled assets
Database Legacy Content Packaged
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The service bus acts as the central hub for communication between all participants of the SOA
(service consumer and service producers). This intermediary provides the ability to achieve
loose coupling and a higher level of flexibility, because the integration points between consumer
and provider can be configured at run time rather than hard-coded. This technique also isolates
service consumers from minor changes in the service provider.
Oracle Service Bus 11g: Design and Integrate Services 2 - 23
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A major challenge for SOA initiatives is attributed to the inherently heterogeneous multi-
vendor IT landscape in many enterprises and the resultant individual silos of business
information. The influx of web service interfaces to functionality within existing packaged
applications often introduces services that do not adhere to established service and
compliance guidelines. This is especially true if the services are published from core
enterprise systems such as CRM, data warehouses, and ERP. This inevitably results in
complex service sprawls within enterprise IT environments.
In the slide, the architect highlights one of the major challenges faced in SOA.
Oracle Service Bus 11g: Design and Integrate Services 2 - 24
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SOA Implementation Challenge
Architect: Although SOA addresses the integration
challenge, one of the key problems enterprise architects
face is managing service mediation and ensuring effective
reusability of services.
IT Manager: Can you explain this further?
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The specific challenges faced by enterprise architects who are responsible for messaging and
SOA initiatives in todays enterprise include the following:
Introducing dynamic behavior and runtime configuration capabilities into a system
Reusing services that are developed across the enterprise and managing their life cycle
Ensuring consistent use of enterprise services
Ensuring that enterprise services are secure
Ensuring that enterprise services comply with the IT policies
Monitoring and auditing service usage and managing system outages
Applications are typically hard-coded to the services that they use. This can cause
maintenance issues when a service changes. When services are used across the enterprise,
the development team that creates the service can frequently be different from the
development team that built the application. What happens when the service is updated?
What if the schema that the service previously used is no longer valid?
The graphic in the slide illustrates an example of service sprawl, with multiple services
connected point-to-point with multiple applications.
Oracle Service Bus 11g: Design and Integrate Services 2 - 25
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Service Sprawl
Service Service Service Service
Application Application Application Application
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 2 - 26


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Solution to Service Sprawl
Architect: To realize the benefits of SOA, it is important
that organizations include a service intermediary that
provides a layer of abstraction to mask the complexities of
service integration in heterogeneous IT environments.
One way to do this is by including a service bus as the
intermediary.
IT Manager: As an architect, what do you suggest as a
possible solution to service sprawl?
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

An Enterprise Service Bus (ESB) supports dynamic synergy and alignment of business
process interactions, continual evolution of existing services, and rapid addition of new ones.
ESB is a concept that has gained the attention of architects and developers for its effective
approach to solving common SOA hurdles associated with service orchestration, application
data synchronization, and business activity monitoring.
Oracle Service Bus (OSB) is a configuration-based, policy-driven ESB. It provides a feature-
rich console for dynamic service and policy configuration, as well as for system monitoring
and operations tasks. Oracle Service Bus facilitates a loosely coupled architecture, facilitates
enterprise-wide reuse of services, and centralizes managementall of which results in an
improved total cost of ownership. The Oracle Service Bus Console enables you to respond
rapidly and effectively to changes in your service-oriented environment. With OSB, you can
loosely couple the services in your enterprise to have a more flexible environment.
The graphic in the slide depicts multiple services connected to multiple applications through
Oracle Service Bus.
Oracle Service Bus 11g: Design and Integrate Services 2 - 27
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Oracle Service Bus
Service Service Service Service
Application Application Application Application
Oracle Service Bus
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus:


Dynamically transforms and routes services by using simple and complex routing rules
and message payloads
Orchestrates services from existing IT systems with disparate messaging protocols
without the need to change the systems and styles
Isolates service location changes
Rapidly responds to business needs by quickly configuring routing rules based on
changes to business rules or existing IT systems, without coding
Orchestrates several services to create new ones
Supports message enrichment
Enables optimized, pluggable, policy-driven transport and message-level security
Implements rules-driven, configurable service-level agreement (SLA)
Each of these features is discussed in detail in the following slides.
Oracle Service Bus 11g: Design and Integrate Services 2 - 28
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Key Features of Oracle Service Bus
Supports multiprotocol messaging
Enables location transparency
Handles dynamic routing
Enables message transformation
Enables service orchestration
Supports message enrichment
Provides service security
Implements service-level agreements
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

OSB supports multiprotocol messaging by using:


Hypertext Transmission Protocol, Secure (HTTPS)
Simple Object Access Protocol (SOAP)
Java Message Service (JMS) for store-and-forward and third-party messaging products
File/FTP/email (SMTP/POP/IMAP)
Tuxedo
Enterprise JavaBeans (EJB)
Native MQ
Oracle JCA Adapter for Files/FTP
Oracle Service Bus 11g: Design and Integrate Services 2 - 29
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Oracle Service Bus as a Message Broker
OSB configurations can mix and match transports with
end-to-end guaranteed delivery if the transport protocol
supports it.
Service Clients
Oracle Service Bus Enterprise
Services
WS-RM
TUX
MQ
EJB
JCA
HTTP/SOAP
JMS
FTP
REST
File
Message brokering
Service A
Service B
Service C
Service D
Service E
Client A
Client B
Client C
Client D
Client E
Multiprotocol
Messaging
WS processing
Multicommunications
paradigms
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You can use Oracle Service Bus to resolve differences between service client and business
service requirements in the following areas:
Payload contents and schema
Envelope protocols
Transport protocols
Point-to-point and publish-and-subscribe protocols
One-way and request-response paradigms
Synchronous and asynchronous communication
Security compliance
The graphic in the slide shows OSB acting as a message broker using multiple transports.
Oracle Service Bus 11g: Design and Integrate Services 2 - 30
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In the example shown in the slide, several applications (including the New-Hire Process
application) use an Initialize Benefits service hosted in Host A. All the traffic to this service is
routed through the service bus. Assume that for some technical or business requirement, the
Initialize Benefits service is moved to a different host machine (Host B) with a different
address. Because you have a service bus, you can avoid application upgrades by simply
defining a new routing policy for the Initialize Benefits service. This approach allows the New-
Hire Process to remain completely unchanged.
Oracle Service Bus 11g: Design and Integrate Services 2 - 31
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Location Transparency
OSB can be used to isolate service location changes.
Host A
New-Hire
Process
Initialize Benefits
Service
Initialize Benefits
Service
Host B
Service Bus
Route to
HostB
SOAP SOAP
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The scenario depicted in the slide describes two services that exist in the HR Portal: one for
onboarding new employees and a similar one for onboarding new employees who are also
managers. Because these services are so similar, the architect team has decided that they
should be combined.
To minimize any later maintenance and potential down time to the HR Portal, the architect
team has defined an interim service bus policy, or rule, that simulates a combined Employee
and Manager service. It dynamically routes requests to one of the current services by
inspecting the title field of each incoming message. If the field contains the text manager, the
request is routed to the New Manager service.
Because the interfaces of these services are not identical, one or more transformations need
to be defined.
Oracle Service Bus 11g: Design and Integrate Services 2 - 32
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Dynamic Routing
Dynamic routing involves defining and configuring business
rules based on changes to business rules or existing IT
systems.
Service Bus
Title =
Manager
?
New Employee
Service
SOAP
New Manager
Service
Transform
HR Portal
SOAP
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

When dealing with transformations, OSB supports the following functionality:


Validating incoming messages against schemas
Selecting a target service or services based on the message content or message
headers
Transforming messages based on the target service
Transforming messages based on XQuery or XSL Transformations (XSLT)
Transforming both XML and Message Format Language (MFL) messages
Enriching messages
Performing callouts to web services to gather additional data for transformation
When a message comes to Oracle Service Bus, it can be manipulated in different ways. One
of the most common uses with OSB is to route a service based on the content of a message.
This is called content-based routing and uses XQuery and XPath to access the content of the
message. You may also find that the format of the incoming message does not exactly match
the format of the service that you want to use. In this instance, you can use OSB to transform
the message and add or remove any missing message elements.
The graphic in the slide shows the service bus applying transformations to messages before
routing them to services.
Oracle Service Bus 11g: Design and Integrate Services 2 - 33
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Transformations
Transform messages to match the format of a service.
Service Bus
Transform Payroll Service
JMS
Expense
Reimbursement
Process
SOAP
Submit Expense
Report Service
FTP
Transform
Transform
Check Order
Status Service
SOAP
Inventory
Management
App
JMS
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The graphic in the slide depicts an IT infrastructure that includes the following three services:
Account Validation, Check Price, and Check Inventory.
Assume that you are currently in the process of upgrading your Purchase Order application,
which consumes each of these services individually as part of validating a new purchase
order.
You realize that the Purchase Order application and several others all utilize these three
services, which leads to an opportunity for reuse. Because you have a service bus, you can
configure a sequence of routing and transformation policies to create a new composite
Validate Order service for the Purchase Order application. This service can also be consumed
by other applications.
Oracle Service Bus 11g: Design and Integrate Services 2 - 34
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Service Orchestration
Combining existing services to make new services:
Service Bus
Validate
Order
Service
Check Price
Service
Account Validation
Service
Check Inventory
Service
SOAP
Purchase
Order
process
SOAP
1
2 3
4
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The graphic in the slide shows the service bus obtaining customer history from the Get
Customer History service and adding the customer history to the message that goes to the
Rate Quote service. This involves configuring a service bus policy to invoke this intermediate
service as part of any request to the Rate Quote service, and then using a transformation to
update (or enrich) the incoming request message with the required customer history data.
Oracle Service Bus 11g: Design and Integrate Services 2 - 35
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Message Enrichment
Oracle Service Bus enables message enrichment by inserting
additional required information into an incoming message.
Service Bus
Get Customer
History Service
Call
Service
Transform
Message
Rate Quote
Service
Insurance
Portal
...
<Customer
History>
...
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus supports HTTPS proxy services and HTTPS business services. HTTPS
proxy services receive client requests over the HTTPS protocol. The response to the client is
sent over the same HTTPS connection. Proxy services route messages to HTTPS business
services over the HTTPS protocol. In this case, the proxy service acts as an HTTPS client by
opening an HTTPS connection to the business service. The response from the business
service is received over the same HTTPS connection.
You can configure Oracle Service Bus to provide transport security over JMS for inbound
messages to a proxy service and outbound messages from a proxy service. The connection
to JMS servers can be secured by using the T3S protocol (T3 over SSL). Although this does
not provide end-to-end security for JMS messaging, it does provide:
The option to use a secure SSL channel for communication between Oracle Service
Bus and the JMS server for sending or receiving JMS messages
The ability to specify the credentials (username and password) that the Oracle Service
Bus proxy services use to authenticate while establishing the connection to a JMS
server, or while looking up JMS destinations in the Java Naming and Directory
Interface (JNDI) tree, or both
Oracle Service Bus 11g: Design and Integrate Services 2 - 36
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Security
Security with OSB includes support for the following:
Authentication, encryption and decryption, and digital
signatures as defined in the Web Services Security (WS-
Security) specification
Secure sockets layer (SSL) to support traditional
transport-level security for HTTP and Java Message
Service (JMS) transport protocols
One-way and two-way certificate-based authentication
HTTP basic authentication
WS-Policy and WS-PolicyAssertions
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The supported security method for email or FTP transport is the username and password
needed to connect to the email or FTP server.
You configure WS transport security through WS-Policy files, either from a Web Services
Description Language (WSDL) or bound directly to the service.
To secure email, you must designate a service account as an alias for the username and
password in the Oracle Service Bus Console. The service uses the username and password
to authenticate to the Simple Mail Transfer Protocol (SMTP) server.
To secure FTP, select external_user in the Oracle Service Bus Console and designate a
service account as an alias for the username and password. The service uses the username
and password to authenticate to the FTP server.
WS-Policy is a specification that enables web services to use XML to advertise their policies
(on security, quality of service, and so on) and enables web service consumers to specify
their policy requirements.
WS-PolicyAssertions is a specification that defines a common set of policy assertions for web
services. The assertions defined by this specification cover text encoding, natural language
support, versioning of specifications, and predicates.
Oracle Service Bus 11g: Design and Integrate Services 2 - 37
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus implements service-level agreements (SLAs) and automated responses
to SLA violations by enabling you to define rules that specify unacceptable service
performance and the system response that you require under those circumstances.
You can construct rules that Oracle Service Bus evaluates against its aggregated metrics
each time it updates that data. When a rule evaluates to TRUE, it raises an alert. Rules can
be configured to generate an alert log that is displayed on the dashboard. In addition, Oracle
Service Bus executes the action you specified for the rule when it evaluates to TRUE. You
can assign either of the following types of actions to a rule:
Send email notification
Send a JMS message
Oracle Service Bus 11g: Design and Integrate Services 2 - 38
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Service-Level Agreements
Service-level agreements (SLAs) define the precise level
and quality of service to be expected from services.
Administrators can configure alerts for SLA rule violations.
The administrator can configure multiple levels of severity
for an alert.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 2 - 39


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Architecture and Functional Features
Architect: Sure.
IT Manager: Okay, I now understand the basic features
of Oracle Service Bus. Can you give a snapshot view of
its architecture and core functional features?
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus is Oracles answer to the challenges that face distributed service
networks, including the ones just described. It provides your enterprise with a scalable and
adaptable mediation layer for your service infrastructure.
It is important to note that OSB leverages Oracles popular WebLogic enterprise infrastructure
as its hosting platform. This includes the high-performance JRockit Java Virtual Machine
(JVM) as well as WebLogic Server, the powerful Java Platform, Enterprise Edition (Java EE)
environment.
In effect, OSB runs as a layer on top of WebLogic Server and can, therefore, gain many
advantages, from clustering to diagnostics. This release supports WebLogic Server 10.3.
Oracle Service Bus 11g: Design and Integrate Services 2 - 40
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Architecture
SOA Operations
Service
Architects
Service
Engineers
High-performance JVM
Scalable, robust, and flexible Java EE Infrastructure
Eclipse-based IDE
SOA Infrastructure
Oracle Service Bus
Oracle WebLogic Server
Oracle JRockit JDK
E
c
l
i
p
s
e
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus enables management and integration of messages and services across a
services network. Its core functional features are separated into the following categories:
Service Integration: Features used for integrating disparate service endpoints, adaptive
messaging, and mediating and exposing services for reuse
Service Security: Features used for service authentication and authorization, message
security enforcement, and user identity validation
Service Composition: Features used for configuring message routing logic, message
transformation, service configuration, validation, and registry
Service Management: Features used for monitoring and managing service activity and
availability
Oracle Service Bus 11g: Design and Integrate Services 2 - 41
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Functional Features
Service Management
Service Virtualization
Unified Security
Configuration
Framework
Adaptive Messaging
Monitoring SLA Alerts Reporting
Content Based Routing
Transformation
Service Chaining
Change
Center
Validation
Import/Export
Authentication Authorization Identity Sign/Encrypt
JDBC SAP HTTP/S JCA SMTP
AQ REST File MQ EJB
Metadata
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Adaptive Messaging
OSB supports a high level of heterogeneity and can reliably connect to any service by
leveraging standards. Adaptive messaging provides flexible message handling and
manipulation between clients and services. For example, a client could send a SOAP
message over HTTP through OSB, which can, in turn, transform the message and invoke a
back-end EJB. Adaptive messaging also supports a variety of communication patterns such
as request/response, synchronous and asynchronous, split-join, and publish/subscribe.
You can also use different patterns for inbound and outbound messages in a single message
life cycle.
Service Security
OSB ensures service security at all levels. Users can also plug in custom or third-party
security components. Built-in capabilities allow flexibility in implementation by enabling
security at all levels (for example, Transport Security, Message Security, Custom Security,
Console Security, and Policy Security).
Service Virtualization
Service virtualization provides agility through message manipulation and control. OSB lets
you flexibly control messages by using validation, transformation, routing based on message
content, parallel processing of multiple items in a message, alert triggering, and error handling
at different points in a message flow.
The OSB configurationdriven composition environment, with OSB plug-ins for Eclipse and
the Oracle Service Bus Console, is designed with a no-coding approach that allows message
flow modeling using versatile graphical modeling tools. OSB supports XML and non-XML
transformation of disparate data types shared between source and destination services. OSB
supports dynamic routing through a service callout feature that allows more flexible and
sophisticated message flow modeling. The Split-Join feature improves service performance
by splitting a message payload and simultaneously processing multiple operations in a
message.
Service Management
Service management includes a powerful set of runtime configuration tools for monitoring,
alerting, and reporting. In addition to a full set of service management features in the Oracle
Service Bus Console, OSB is also fully integrated with Oracle Enterprise Manager for SOA-
wide management. OSB offers embedded service management capabilities that provide
optimized governance of all messaging.
Configuration Framework
The Configuration Framework gives you full control over your OSB production environment.
Configuration and resource changes that you make are tracked, and you can undo or redo
changes, resolve conflicts, maintain dependencies among resources, and test changes in the
Test Console.
OSB provides import and export functionality for individual resources and full OSB
configurations. The Configuration Framework also includes a metadata-driven interface for
service discovery, publishing, and synchronization using Oracle Enterprise Repository and
UDDI registries such as Oracle Service Registry.
Oracle Service Bus 11g: Design and Integrate Services 2 - 42
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 2 - 43


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to:
Describe Service-Oriented Architecture
Explain the SOA Reference Architecture and its different
layers
Identify the core concepts of the Oracle Service Bus
Explain the role and features of the Oracle Service Bus
Identify the functional features of Oracle Service Bus
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Many of the practices contain a solution file that you can use to complete the practices if you
are unable to do so. Refer to the Solution Instructions section at the end of each lessons
practices in the Activity Guide.
Oracle Service Bus 11g: Design and Integrate Services 2 - 44
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Practice 2 Overview:
Introduction to Oracle Service Bus
This practice covers the following topics:
Creating an NX-Client Desktop session and logging on to
the ACES machine assigned
Setting up for practices
Starting the Administration, OSB, and SOA WebLogic
servers
Deploying the SOA composite application by using Oracle
Enterprise Manager Fusion Middleware Control
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Message Flow
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 3 - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to:
Identify and describe the Oracle Service Bus resources
Explain the message context model
Identify the message context variables
Describe the message flow process
Identify and explain the nodes and elements of a message
flow
Configure simple routing to a service in a message flow
Use context variables in a message flow
Configure branching in a message flow
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus (OSB) mediates service request and response messages between
disparate heterogeneous service endpoints and intelligently routes messages between them.
Content-based routing is a mediation capability supported by OSB based on conditional
message processing and transformation capabilities. This routing capability enables loose
coupling of SOA endpoints and is particularly useful. It enables service enrichment and reuse
by combining transformation and routing functions.
Proxy services are definitions of generic intermediary web services that are hosted locally on
OSB. A proxy service communicates with other services in the IT infrastructure through
interfaces, which may or may not be identical to that of a service provider or service consumer
business service. Proxy services can route messages to multiple business services, using
their configured independent interfaces. Proxy services can be defined and configured using
the Oracle Service Bus Console. They are configured by specifying their interface, the type of
transport the OSB uses, and their associated message-processing logic.
Oracle Service Bus 11g: Design and Integrate Services 3 - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Service Bus Architecture
Service
consumer
Service
producer
Service
producer
Service
producer
Business
service
Business
service
Business
service
Oracle Service Bus
Proxy service
Inbound
Outbound
Message flow
OSB Console
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Business services are Oracle Service Bus definitions of the enterprise services that exchange
messages during business processes. A business service and its interface can be defined
and configured using the Oracle Service Bus Console. A business service is configured by
specifying its interface, the type of transport that it uses, its security requirements, and other
characteristics.
The inbound transport layer is the communication layer between client services (or service
consumers) and Oracle Service Bus. The outbound transport layer is responsible for the
communication between business services (or service producers) and Oracle Service Bus.
Oracle Service Bus 11g: Design and Integrate Services 3 - 4
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Oracle Service Bus Console is a web services management dashboard that enables you
to monitor web services and servers and perform service management tasks. The console
enables you to perform operational tasks such as configuring proxy and business services,
setting up security, managing resources, and capturing data for tracking or regulatory
auditing. It provides views to monitor the current state and health of the Oracle Service Bus
environment by displaying detailed statistics about servers, services, and alerts. The console
also enables you to respond rapidly and effectively to changes in your service-oriented
environment.
The graphic in the slide shows the OSB Console with Project Explorer open.
Oracle Service Bus 11g: Design and Integrate Services 3 - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Oracle Service Bus Console
The OSB Console enables you to create, manage, and
configure your OSB environment.
With the console, you can:
Create and manage projects and project folders
Create and manage business
and proxy services
Test proxy and business
services
Modify the security
configuration
Import and export
resources
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus resources (for example, services, WS-Policies, WSDL, XQuery
transformations, and so on) reside in exactly one project. Projects do not overlap. Resources
can be created directly under a project, or they can be further organized into folders. You can
reference any resource regardless of the project in which it resides.
Project Explorer organizes configurations and resources into projects and folders. In Project
Explorer, you can display the Projects View page (which lists all projects in the domain) and
the Project/Folder View pages (which list folders and resources in each project).
Note: When you create a domain in Oracle Service Bus, a default project is created.
Oracle Service Bus 11g: Design and Integrate Services 3 - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Projects and Resources
An OSB project is a container for resources.
Within a project, there are various resources that can be
created.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To create an OSB project:


1. Click Create in the OSB Console Change Center.
2. Click Project Explorer.
3. Click Projects in Project Explorer.
4. Enter the project name and click Add Project.
You can now add resources to the project. When the session is complete, return to the
Change Center and activate your changes. Folders can be added to projects in a similar
fashion.
The graphic in the slide shows the four steps for creating a project in the OSB Console.
Oracle Service Bus 11g: Design and Integrate Services 3 - 7
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Projects
An OSB project is a container for the different OSB resources
that you create.
1
2
3
4
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus has a robust resource configuration and organization framework for
creating, organizing, and configuring resources and ensuring semantic integrity between
resource dependencies. It provides features to rapidly test, deploy, and reverse resource
configuration updates if required.
The graphic in the slide shows the list of resource types available in the OSB Console.
Oracle Service Bus 11g: Design and Integrate Services 3 - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Resource Types
Within an OSB project, you can create
or import resources, including:
Proxy services
Business services
Transformations
XML schemas
WSDL
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Business services are Oracle Service Bus definitions of the enterprise services with which
you want to exchange messages. You define business services using WSDL in the same way
you would define a proxy service. However, the configuration of business services differs from
the configuration of proxy services in that a business service does not have a pipeline.
Therefore, a business service is any service that is not implemented by OSB pipelines.
Oracle Service Bus 11g: Design and Integrate Services 3 - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Business Services
A business service:
Is contained within an OSB project
Defines a protocol used with the service
Defines a URL that is called when the service is invoked
The properties of a business service depend on which
protocol is selected.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To create a business service:


1. In the General Configuration pane, enter a service name.
2. Select the service type.
3. In the Transport Configuration pane, select a protocol.
4. Configure the endpoint URI.
When you are using WSDL, the uniform resource identifier (URI) defaults to the service URI
of the WSDL. For other protocols, there is no default.
The graphic in the slide shows the steps to create a business service.
Oracle Service Bus 11g: Design and Integrate Services 3 - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Creating a Business Service
1
2
3
4
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus proxy services are definitions of intermediary Web services that Oracle
Service Bus implements and hosts locally. Oracle Service Bus uses proxy services to route
messages between business services (such as enterprise web services and databases) and
service clients (such as presentation applications or other business services).
You can create and configure proxy services and business services by using either the
runtime environment (Oracle Service Bus Console) or the development environment (Eclipse
with Oracle Service Bus plug-ins).
A proxy service configuration includes its interface, transport settings, security settings, and a
message flow definition. The message flow definition defines the logic that determines how
messages are handled as they flow through the proxy service. If a proxy service is based on a
WSDL document, the configuration also includes a WSDL port or a WSDL binding.
You can create a proxy service without a route node. For example, this can be done to
implement a common transformation service within OSB that is invoked by other proxies as a
service callout.
Oracle Service Bus 11g: Design and Integrate Services 3 - 11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Proxy Services
A proxy service is the gateway for applications and
services to access OSB.
Each proxy service contains a message flow that allows
actions to be performed on a message.
Every proxy service typically routes to a service.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To create a proxy service:


1. In the General Configuration pane, enter a service name.
2. Select the service type.
3. In the Transport Configuration pane, select a protocol.
4. Configure the endpoint URI.
The graphic in the slide shows the steps to create a proxy service.
Oracle Service Bus 11g: Design and Integrate Services 3 - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Creating a Proxy Service
1
2
3
4
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The port and binding definitions from the original WSDL resource are modified in the effective
WSDL depending on several factors.
Oracle Service Bus 11g: Design and Integrate Services 3 - 13
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Difference Between Binding and Port
When you create a service based on a WSDL resource,
base the service either on a WSDL port or on a WSDL
binding:
When you create a new service based on a binding in a
WSDL resource, you choose the protocol and data format
defined in the selected <binding> element in the WSDL
resource.
When you create a new service based on a port in a WSDL
resource, you choose the binding and network address
defined in the <port> element.
When you create or modify the service, you can change
the transport, but you cannot override the data format.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a
Explanation: Business services are Oracle Service Bus definitions of the enterprise services
with which you want to exchange messages. The configuration of business services differs
from that of proxy services in that a business service does not have a pipeline.
Oracle Service Bus 11g: Design and Integrate Services 3 - 14
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
A business service is any service that is not implemented by
the Oracle Service Bus pipelines.
a. True
b. False
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Message context is the state of the message plus the operational metadata.
SOAP Message Syntax
The graphic in the slide shows a Simple Object Access Protocol envelope. Within the
envelope are a header, body, and attachments. The header contains multiple header entries.
The body contains the message payload.
Oracle Service Bus 11g: Design and Integrate Services 3 - 15
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Message Context Model
The OSB message context is a set of properties that hold the
message content as well as information about messages as
they are routed through Oracle Service Bus.
SOAP Message Syntax
Header
Entry1
Header
Entry2
Envelope
Header
Attachments
Body
Message payload
goes here.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The message properties that hold the message content as well as the information are referred
to as context variables. For example, service endpoints are represented by predefined context
variables. Oracle Service Bus also supports user-defined context variables.
The message context is defined by an XML schema. You typically use XQuery expressions to
manipulate the context variables in the message flow that defines a proxy service.
Oracle Service Bus 11g: Design and Integrate Services 3 - 16
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Using Context Variables
Context variables are the access points to request and
response messages.
Use context variables to:
Reassemble
Modify
Reroute
Make runtime decisions about message processing
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The message context schema specifies the element types for the message context variables.
Oracle Service Bus 11g: Design and Integrate Services 3 - 17
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Predefined Context Variables
The predefined context variables can be grouped into the
following types:
Message-related variables
Inbound and outbound variables
Operation variable
Fault variable
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 3 - 18


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Predefined Context Variables:
Descriptions
Context
Variable
Description
header Contains the SOAP headers for SOAP messages (for SOAP
messages that contain a SOAP header). The header variable
contains an empty SOAP header element for message types other
than SOAP.
body For the following cases:
SOAP message: Contains the <SOAP:Body> part extracted from
the SOAP envelope
Non-SOAP, nonbinary message: Contains the entire message
content wrapped in a <SOAP:Body> element
Binary message: Contains a <SOAP:Body> wrapped reference to
an in-memory copy of the binary message
attachments Contains the MIME attachments for a given message
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 3 - 19


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Predefined Context Variables:
Descriptions
Context
Variable
Description
inbound Contains information about the proxy service that receives a
message and the inbound transport headers
outbound Contains information about the target service to which a message is
to be sent and the outbound transport headers
operation Identifies the operation that is being invoked on a proxy service
fault Contains information about errors that have occurred during the
processing of a message
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The message-related header, body, and attachments variables represent the canonical
format of a message as it flows through Oracle Service Bus. These variables are initialized
using the message content received by a proxy service and are used to construct the
outgoing messages that are routed or published to other services.
The decision about which variables content to include in an outgoing message is dependent
on whether the target endpoint is expecting a SOAP or a non-SOAP message.
If a SOAP message is required, the header and body variables are combined in a
SOAP envelope to create the message.
If a non-SOAP message is required, the content of the body element in the body
variable constitutes the entire message.
In either case, if the service expects attachments, a MIME package is created from the
resulting message and the attachments variable.
In the following slides, message-related variables are explained in greater detail.
Oracle Service Bus 11g: Design and Integrate Services 3 - 20
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Message-Related Variables
A message payload is contained in the body variable.
If you want to modify a message while processing it, you
must modify these variables.
The decision about which variables content to include in
an outgoing message is made at the point at which a
message is dispatched, published, or routed.
SOAP Message
$header
$attachments
$body
Body of Message
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The header variable contains the SOAP headers associated with a message.
The graphic in the slide shows multiple entries for the SOAP header element. The header
element is followed by the body and attachments.
Oracle Service Bus 11g: Design and Integrate Services 3 - 21
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$header Variables
$header has a SOAP header element that points to the
<SOAP:Header> element with actual headers as
subelements.
If there are non-SOAP messages or SOAP messages
without headers, the <SOAP:Header> element is empty.
SOAP Envelope
Header
Entry1
Body
Attachments
$header
Header
Entry2
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The body variable represents the core message payload and always points to a
<SOAP:Body> element.
Note: For processing message content, you can specify that the Oracle Service Bus pipeline
should stream the content rather than load it into memory. When you enable the streaming
option, content streaming applies only to the body variable.
When you enable streaming for large message processing, you cannot use the insert,
replace, rename, for each, validate, and delete actions with respect to the body message
context variable. The reason is that these actions require the input variable to be fully
materialized in memory, and full materialization is incompatible with the content streaming
option. You can use the results of an XQuery or XSL Transformations from a very large
$body with pipeline actions such as Java callouts, MFL transformations, service callouts,
and so on.
Oracle Service Bus 11g: Design and Integrate Services 3 - 22
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$body Variables
The core payload for both SOAP
and non-SOAP messages is
always available via (wrapped in)
the <SOAP:Body> element.
If it is a SOAP message, $body
points to the actual
<SOAP:Body> element.
Otherwise, the <SOAP:Body>
element is created and
populated with the full message
contents, excluding attachments.
SOAP Envelope
$body
Attachments
Header
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In the case of binary messages, rather than inserting the message content into the body
variable, a <binary-content/> reference element is created and inserted into the
<SOAP:Body> element.
There are two patterns to deal with:
Binary content is included in the incoming message.
Binary content is not included and is already referenced by a <binary-content
ref=> tag in the message body.
Note: You can configure proxy services based on file, email, and FTP to pass content by
reference.
Oracle Service Bus 11g: Design and Integrate Services 3 - 23
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$body Binary Content
Binary is not text, not XML, and not Message Format
Language (MFL).
The rule is that binary content is always replaced by a
reference XML element:
<binary-content ref=>
The reference is the in-memory hash table.
Binary content is never left in $body
(or $attachments).
The benefit is processing efficiency.
The tradeoff is that binary content cannot be modified.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The content of a POJO (Plain Old Java Object) variable is not directly accessible by pipeline
actions at configuration time. The content can be handled in the following ways:
The contents metadata (key) can be handled as any other XML (for example, in an
XQuery such as $pojo/java-content/@ref). This may be useful for logging or
debugging, but the content of the object cannot be directly accessed.
The content can be assigned to a new variable that automatically becomes typed (in the
pipeline) as a POJO. The object itself is not touched. The <java-content.../> XML
snippet is copied from the source variable to the target variable.
The content can be passed to another appropriate action (such as a Java callout) as a
variable (for example, $pojo). The object itself is not touched. The argument is
automatically de-referenced to the actual object.
Oracle Service Bus 11g: Design and Integrate Services 3 - 24
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$body Java Content
The Oracle Service Bus pipeline supports Java objects as
inputs and outputs to Java callout actions.
A POJO returned by a Java callout is cached in the
pipeline, and its key is returned wrapped in an XML
message of the form <java-content
ref=cid:kkkkeeeeyyyy/>, where
cid:kkkkeeeeyyyy is a key that is automatically
generated by the producing action and used to index the
object in the pipelines cache.
Any subsequent action then passes that XML unmodified
as an argument.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The attachments variable holds the attachments associated with a message. The
attachments variable is defined by an XML schema. It consists of a single root node
<ctx:attachments> with a <ctx:attachment> subelement for each attachment. The
subelements contain information about the attachment (derived from MIME headers) as well
as the attachment content. As with most of the other message-related variables, the
attachments variable is always set, but if there are no attachments, the attachments
variable consists of an empty <ctx:attachments> element.
The graphic in the slide shows the attachments element within the SOAP envelope. It is
preceded by the header and body elements.
The subelements of the $attachments variable are:
Content-ID: A globally unique reference that identifies the attachment. The type is string.
Content Type: Specifies the media type and subtype of the attachment. The type is
string.
Content-Transfer-Encoding: Specifies how the attachment is encoded. The type is
string.
Oracle Service Bus 11g: Design and Integrate Services 3 - 25
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$attachments Variable
$attachments has the attachments element with zero or
more attachment subelements.
Each subelement represents an attachment along with its
MIME metadata.
SOAP Envelope
Body
$attachments
Header
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Content-Description : A textual description of the content. The type is string.


Content-Location: A locally unique URI-based reference that identifies the attachment.
The type is string.
Content-Disposition: Specifies how the attachment should be handled by the recipient.
The type is string.
Body: Holds the attachment data. The type is anyType.
Oracle Service Bus 11g: Design and Integrate Services 3 - 26
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Web services can expose one of two styles for binding to their web operations in the WSDL
contract that describes them:
Document
RPC
Be aware that different encodings and web service styles (doc literal versus RPC, for
example) cause the structure of the body variable to change.
Oracle Service Bus 11g: Design and Integrate Services 3 - 27
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$body and RPC
This SOAP body element is an example of a remote
procedure call (RPC) from a SOAP message:
<soap-env:Body>
<ns:operationname>
<ns:parametername>
parameter (type or element)
</ns:parametername>
</ns:operationname>
</soap-env:Body>
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

There are four core elements within the $fault variable:


errorCode: Holds an error code as a string value
Reason: Contains a brief textual description of the error
Details: Contains arbitrary XML content about the error
Location: Identifies the pipeline and the stage where the error occurred
Oracle Service Bus 11g: Design and Integrate Services 3 - 28
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$fault Variable
OSB uses the $fault variable to hold:
The error code
The reason for errors thrown by external services
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The inbound and outbound context variables contain information about the inbound and
outbound endpoints, respectively. The inbound variable contains information about the proxy
service that received the request message; the outbound variable contains information
about the target business service to which a message is sent.
The outbound variable is set in the route action in route nodes and publish actions. You can
modify $outbound by configuring request and response actions in route nodes and by
configuring request actions in publish actions.
The subelements of the inbound and outbound context variables include:
service
transport
security
Oracle Service Bus 11g: Design and Integrate Services 3 - 29
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$inbound and $outbound Variables
$inbound variable contains:
Information about the proxy service that received a message
Inbound transport headers
$outbound variable contains:
Information about the target service to which a message is to
be sent
Outbound transport headers
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus provides the operation variable as a stand-alone variable, rather than
as a subelement of the inbound variable to optimize performance
If no operations are defined for a proxy service, the operation variable is not set and
returns the equivalent of null.
Oracle Service Bus 11g: Design and Integrate Services 3 - 30
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$operation Variable
The operation variable is a read-only variable.
It contains a string that identifies the operation to be
invoked on a proxy service.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

An assign action assigns the result of an XQuery expression to a context variable.


In this example, you see a user-defined variable called shippingorder. In this instance, it
gets the result of an Assign action that takes an expression, evaluates it, and changes the
result into a variable. Assign actions are discussed in detail in the lesson titled Message Flow
Actions.
Oracle Service Bus 11g: Design and Integrate Services 3 - 31
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
User-Defined Context Variables
Oracle Service Bus also supports user-defined context
variables.
By simply entering a value in a message configuration field
such as return parameter, you cause a user-defined
context variable to be created with the name of the entered
value.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

During design time, user-defined variables are not visible outside the pipeline in which they
are created.
Oracle Service Bus 11g: Design and Integrate Services 3 - 32
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Variables and Types
At design time:
All variables (user and system defined) are scoped for the
entire service
$outbound, $inbound, $fault, and $operation are
typed. Others are not because their contents vary.
At run time:
Variables are automatically created when first assigned a
value during execution
Variables are deleted when the service execution terminates
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The graphic in the slide shows messaging between the client and OSB.
Oracle Service Bus 11g: Design and Integrate Services 3 - 33
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Inbound Message Dispatching
In inbound message dispatching:
If binary content is included in the message, the reference
element is created
If binary content is already referenced, pass exactly
as is
Inbound messaging
Client OSB
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The graphic in the slide shows outbound messaging between a proxy service and a business
service.
Oracle Service Bus 11g: Design and Integrate Services 3 - 34
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Outbound Message Dispatching
If the <binary-content ref=> URI is recognized as
one that refers to internally managed binary content, the
binary content is added back to the body (before the
message is sent to its external destination).
Otherwise, the reference XML (<binary-content
ref=>) is sent to the destination as is.
Outbound messaging
OSB
Proxy
Service
OSB
Business
Service
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: g
Explanation: All of the given options except transport are predefined context variables.
Oracle Service Bus 11g: Design and Integrate Services 3 - 35
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Which one of the following is not a predefined context variable?
a. header
b. body
c. attachments
d. outbound
e. operation
f. fault
g. transport
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Nodes are configured to route messages through the message flow.


Stages and actions contain rules for processing and transforming messages.
The processing logic in a message flow is handled in pipelines. A pipeline is a named
sequence of stages representing a nonbranching, one-way processing path. Pipelines
belong to one of the following categories:
- Request pipelines: Process the request path of the message flow
- Response pipelines: Process the response path of the message flow
- Error pipelines: Handle errors for stages and nodes in a message flow as well as
errors at the level of the message flow (service)
Oracle Service Bus 11g: Design and Integrate Services 3 - 36
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Message Flow Components
A message flow is composed of components that define
the logic for routing and manipulating messages as they
flow through a proxy service.
The components used in a message flow are:
Start node
Pipeline pair node
Stage
Error handler
Branch node
Route node
Pipeline pair with
stage node
Error handler
pipeline
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The following message flow components are available for defining a message flow:
Start node: Every message flow begins with a start node. All messages enter the
message flow through the start node, and all response messages are returned to the
client through the start node. There is nothing to configure in a start node.
Pipeline pair node: A pipeline pair node combines a single request pipeline and a
single response pipeline in one top-level element. A pipeline pair node can have only
one direct descendant in the message flow. During request processing, only the request
pipeline is executed when Oracle Service Bus processes a pipeline pair node. The
execution path is reversed when Oracle Service Bus processes the response pipeline.
Stage: Request pipelines, response pipelines, and error handlers can contain stages in
which you configure actions to manipulate messages passing through the pipeline.
Error handler: An error handler can be attached to any node or stage to handle
potential errors at that location.
Branch node: A branch node allows processing to proceed along exactly one of several
possible paths. Operational branching is supported for WSDL-based services, where the
branching is based on operations defined in the WSDL. Conditional branching is
supported for conditions defined in an XPath-based switch table.
Route node: A route node performs request/response communication with another
service. It represents the boundary between request and response processing for the
proxy service. When the route node dispatches a request message, the request
processing is considered complete. When the route node receives a response message,
the response processing begins. The route node supports conditional routing as well as
request and response transformations. Because a route node represents the boundary
between request and response processing, it cannot have any descendants in the
message flow.
Oracle Service Bus 11g: Design and Integrate Services 3 - 37
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Branching is driven by a simple lookup table, with each branch tagged with a simple but
unique string value. A variable in the message context is designated as the lookup variable
for that node, and its value is used to determine which branch to follow. If no branch matches
the value of the lookup variable, a default branch is followed. The value of the lookup variable
must be set before the branch node is reached. This approach ensures that exceptions do not
occur within the branch node itself. A branch node may have several descendants in the
message flow tree: one for each branch, including the default branch.
The graphic in the slide shows messages passing between the branching and nonbranching
nodes. The branch nodes have multiple possible exit paths.
Oracle Service Bus 11g: Design and Integrate Services 3 - 38
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Branching
A branch node allows
processing to proceed down
exactly one of several
possible paths.
Response
Pipeline
Request
Pipeline
Branch
Nodes
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You must use operational branching when a proxy service is based on a WSDL with multiple
operations.
Conditional branching is driven by a lookup table, with each branch tagged with simple,
unique string values. You can configure a conditional branch to branch based on the value of
a variable in the message context (declared, for example, in a stage earlier in the message
flow), or you can configure the condition to branch based on the results of an XPath
expression defined in the branch itself. At run time, the variable or the expression is
evaluated, and the resulting value is used to determine which branch to follow. If no branch
matches the value, the default branch is followed.
Oracle Service Bus 11g: Design and Integrate Services 3 - 39
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Branching Types
Operational branching: Creates a branch for each WSDL
operation defined on the service
Conditional branching: Allows the conditional execution
of pipeline pairs and route nodes, based on message data
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Conditional branching enables branching based on a specified condition (for example, the
document type of a message). Conditional branching is driven by a lookup table. You can use
conditional branching to expose the routing alternatives for the message flow at the top-level
flow view.
A branch node may have several descendants in the message flow: one for each branch,
including the default branch. You should always define a default branch. If no branch matches
the value, the default branch is followed. You should design the proxy service in such a way
that the value of a lookup variable is set before reaching the branch node.
The first graphic in the slide shows the pop-up menu that appears when you click either a
Pipeline Pair node or a Branch node. The second graphic shows the final view of the
conditional branch.
Oracle Service Bus 11g: Design and Integrate Services 3 - 40
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Conditional Branch
You can configure a message flow to make decisions
through a conditional branch.
Conditional branching is driven by a lookup table, with
each branch tagged with simple, unique string values.
Conditional branch
Invoking a
conditional branch
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

When message flows define WSDL-based proxy services, operation-specific processing is


required. When you create an operational branch node in a message flow, you can build
branching logic based on the operations defined in the WSDL.
You must use operational branching when a proxy service is based on a WSDL with multiple
operations. You can consider using an operational branch node to handle messages
separately for each operation.
An operational branch is used if different actions need to be performed depending on the
operation. If the message is being passed through largely unchanged operations (or if the
change is common to all operations), the use inbound operation for outbound flag can be
used when routing to the business service.
Oracle Service Bus 11g: Design and Integrate Services 3 - 41
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Operational Branch
The branching logic in an operational branch node in a
message flow is built based on the operations defined in
the WSDL.
You can use operational branching when a proxy service is
based on a WSDL with multiple operations.
An operational branch is used if different actions need to
be performed depending on the operation.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Use the Expression Editor to enter simple XQueries that consist of the following:
Fragments of XML with embedded XQueries
Simple variable paths along the child axis
The Expression Editor is used to create variable structures with which you define the
structure of a given variable for design purposes. The Expression Editors that can be used
are:
XQuery/XSLT Expression Editor: To create variable structures, define user
namespaces, use predefined message context variables to build inline XQuery
expressions, build inline XQuery expressions manually, and select XQuery or XSLT
resources for execution as inline XQueries
XPath Expression Editor: To create an XPath expression that is then inserted into the
location from which you launched the editor
Condition Editor: To create an inline XQuery condition
Oracle Service Bus 11g: Design and Integrate Services 3 - 42
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Expression Editor
The Expression Editor is used to create simple XQuery
expressions that can be used in services.
There are three editors:
XQuery/XSLT Expression Editor
XPath Expression Editor
Condition Editor
Tabs available in
the XSLT
Expression Editor
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You can use the XQuery Expression Editor to create variable structures with which you define
the structure of a given variable for design purposes. For example, it is easier to browse the
XPath variable in the OSB Console than to view the XML schema of the XPath variable.
In a typical programming language, the scope of variables is static. Their names and types
are explicitly declared. You can access the variable anywhere within the static scope.
In OSB, there are some predefined variables, but you can also dynamically create variables
and assign values to them by using the assign action or by using the loop variable in the for
loop. When a value is assigned to a variable, you can access the variable anywhere in the
proxy service message flow. The variable type is not declared, but the type is essentially the
underlying type of the value that it contains at any time.
When you use the XQuery Expression Editor, the XQuery has zero or more inputs and one
output. Because you can display the structure of the inputs and the structure of the output
visually in the Expression Editor, you do not need to open the XML schema or WSDL
resources to see their structure when you create the inline XQuery. The graphical structure
display also enables you to drag simple variable paths along the child axis without predicates
into the composed XQuery.
Oracle Service Bus 11g: Design and Integrate Services 3 - 43
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Variable Structures
The Variable Structures tab gives you access to predefined
variables.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The graphic is a screenshot of the Namespace Definitions tab displayed in the OSB Console.
Oracle Service Bus 11g: Design and Integrate Services 3 - 44
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Namespace Definitions
The Namespace Definitions tab lists all the namespaces that
are used in the OSB configuration.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To use an XQuery Function, drag it to the expression pane.


The graphic in the slide is a screenshot of the XQuery Functions tab, showing the available
functions.
Oracle Service Bus 11g: Design and Integrate Services 3 - 45
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
XQuery Functions
The XQuery Functions tab
lists the set of functions that
can be used to create an
expression.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: b
Explanation: The Variable Structures tab gives you access to predefined variables.
Oracle Service Bus 11g: Design and Integrate Services 3 - 46
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Which tab do you use to access predefined variables?
a. Namespace
b. Variable Structures
c. XQuery Functions
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: b
Explanation: Operational branching is used when a proxy service is based on a WSDL with
multiple operations.
Oracle Service Bus 11g: Design and Integrate Services 3 - 47
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Which type of branching creates a branch for each WSDL
operation defined on the service?
a. Conditional
b. Operational
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a
Explanation: All messages enter the message flow through the start node, and all response
messages are returned to the client through the start node. There is nothing to configure in a
start node.
Oracle Service Bus 11g: Design and Integrate Services 3 - 48
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Every message flow begins with a start node.
a. True
b. False
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 3 - 49


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to:
Identify and describe the Oracle Service Bus resources
Explain the message context model
Identify the message context variables
Describe the message flow process
Identify and explain the nodes and elements of a message
flow
Configure simple routing to a service in a message flow
Use context variables in a message flow
Configure branching in a message flow
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 3 - 50


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Practice 3 Overview:
Message Flow
This practice covers the following topics:
Simple routing
Creating a proxy service
Creating a business service
Routing a proxy service to a business service
Testing a proxy service
Operational branching
Configuring a message flow
Configuring a proxy service to use operational branching
Conditional branching
Adding a conditional branch to a message flow
Testing a proxy service that has conditional branching
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Message Flow Actions
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 4 - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to describe:
Communication actions that you can add to a route or a
stage in a message flow
Flow control actions that you can add to a route or a stage
in a message flow
Message processing actions that you can add to a stage in
a message flow
Reporting actions that you can add to a stage in a
message flow
XQuery mapping and transformations
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The communication and flow control actions are the actions (communication or flow) that you
can add to a route or a stage in a message flow.
The message processing and reporting actions can be added to a stage in a message flow.
The following slides describe these actions in greater detail.
Oracle Service Bus 11g: Design and Integrate Services 4 - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Message Flow Design
A message flow for a proxy service can be constructed
by using the Message Flow Design Palette in Eclipse
or by using the Oracle Service Bus Console.
The four main types of actions that can be applied to a
message flow are:
Communication
Flow control
Message processing
Reporting
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The route node represents the boundary between request and response processing for the
proxy service:
When the route node dispatches a request message, request processing is considered
finished.
When the route node receives a response message, response processing begins.
To create a route node in the OSB Console:
1. Click a proxy service or branch node icon, and then select Add Route.
2. To add actions to the route node, click the RouteNode icon. Then select Edit Route.
The graphic in the slide shows the first two steps for creating a route node.
Oracle Service Bus 11g: Design and Integrate Services 4 - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Route Node
Route nodes are:
Containers that you use to define the message destination
Used to perform request and response communication
with another service
1
2
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A dynamic routing action is a terminal action, which implies that you cannot add another
action after this one. It can, however, contain request and response actions.
Oracle Service Bus 11g: Design and Integrate Services 4 - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Route Node Communication Action:
Dynamic Routing
A dynamic routing action assigns a route for a message based
on routing information available in an XQuery resource.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Like the dynamic routing action, a routing action is a terminal action, which implies that you
cannot add another action after this one. It can, however, contain request and response
actions.
The options that can be set for Routing are:
Service: The target service (business or proxy service) for the routing action
Invoking: The operation to be invoked on the target service. This option appears only if
the selected service defines operations.
Use inbound operation for outbound: Select this option to make the outbound
operation the same as the inbound operation. This option appears only if the selected
service defines operations.
The graphic in the slide shows the process of adding a routing action to a route node.
Oracle Service Bus 11g: Design and Integrate Services 4 - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Route Node Communication Action:
Routing
A routing action identifies a target service for the message and
configures how the message is routed to that service.
Add a Routing action
to a route node.
Specify the Service,
Request, and
Response action.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The routing table action contains a case action with a path to a routing action, in addition to a
default case action with a path to a default routing action. When you click the case action, you
can set the comparison operator and value options against which the value returned from the
XQuery expression defined for the routing table action is evaluated.
In the routing table, use the Expression option to enter a valid XQuery expression, which at
run time returns the value on which the routing decision is made.
Oracle Service Bus 11g: Design and Integrate Services 4 - 7
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Route Node Communication Action:
Routing Table
A routing table is used to select different routes based on
the results of a single XQuery expression in a message
flow.
A routing table action contains a set of routes wrapped in a
switch-style condition table.
Add a Routing Table
action to a route node.
Default case action
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

An if-then action always contains an if condition plus zero or more else-if


conditions where you define the conditions for the if-then action.
An if-then action also always contains an else condition, which defines the default
path when no other condition is met.
Oracle Service Bus 11g: Design and Integrate Services 4 - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Route Node Flow Control Action:
If-Then
An if-then action is used to perform an action or a set of
actions conditionally, based on the Boolean result of an XQuery
expression.
Condition
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Consider a situation where you want to invoke service A or service B based on a condition
known early in the message flow (for example, the message type). You could configure
conditional branching in a routing table in the route node. However, this makes the branching
somewhat more difficult to follow if you are just looking at the top level of the flow.
Instead, you could use a conditional branch node to expose this branching in the message
flow itself and use simple route nodes as the subflows for each of the branches.
Oracle Service Bus 11g: Design and Integrate Services 4 - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Routing Table Versus Conditional Branching
Use conditional branching to expose the routing
alternatives for the message flow at the top-level flow view.
Use conditional branching if the condition that you are
branching on is known early in the message flow.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: b
Explanation: A routing table action contains a set of routes wrapped in a switch-style condition
table. It contains a case action with a path to a routing action in addition to a default case
action with a path to a default routing action.
Oracle Service Bus 11g: Design and Integrate Services 4 - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
What do you use to select different routes based on the results
of a single XQuery expression?
a. Dynamic routing
b. Routing table
c. Route node
d. None of the above
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The actions configured in the request pipeline, response pipeline, and error handler stages
provide instructions for handling messages. Actions that can be added to a stage in a
message flow are:
Communication
Flow control
Message processing
Reporting
Oracle Service Bus 11g: Design and Integrate Services 4 - 11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node
The request pipelines, response pipelines, and error handlers
can contain stages (stage node) where you configure actions
to manipulate messages passing through the pipeline.
Actions that can be
configured in a stage
node
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Service option specifies an XQuery expression that defines the service to which a
message is to be published.
Oracle Service Bus 11g: Design and Integrate Services 4 - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Communication Action:
Dynamic Publish
A dynamic publish action publishes a message to a service
identified by an XQuery expression.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Publish nodes call services asynchronously and can have actions executed before they call
the service.
Properties that can be set for the publish action are:
Service: Target service (business or proxy service) for the routing action
Invoking: Operation to be invoked on the target service. This option appears only if the
selected service defines operations.
Use inbound operation for outbound: Makes the outbound operation the same as the
inbound operation. This option appears only if the selected service defines operations.
Oracle Service Bus 11g: Design and Integrate Services 4 - 13
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Communication Action:
Publish
A publish action publishes a message to a statically specified
service.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A publish table action contains one or more case actions to define conditions for following
alternative paths (by default, via publish actions), as well as a default path to a default publish
action. To fully define a publish table action, you must configure the publish table action, its
case actions, and its publish actions (plus any other actions that you add).
Oracle Service Bus 11g: Design and Integrate Services 4 - 14
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Communication Action:
Publish Table
A publish table action is used to select the target service
based on the results of an XQuery expression.
The switch-style condition logic is used to determine at run
time which service will be used for the publish action.
The publish table action works just like a routing table
action, but the service for the branch is called
asynchronously.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The routing options that can be configured are:


URI for the outbound message
Quality of Service element
Mode of the message flow (The mode can be set to Request or Request-Response.)
Retry Count and Retry Interval
Message priority
Oracle Service Bus 11g: Design and Integrate Services 4 - 15
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Communication Action:
Routing Options
The Routing Options node enables users to modify any or all of
the following properties in the outbound request:
URI
Quality of Service
Mode
Retry parameters
Priority
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A service callout action configures a synchronous (blocking) callout to a proxy or business


service that is registered in Oracle Service Bus. The service callout action is used in response
to decisions made in complex dynamic routing processing; it is used to perform message
enrichment. The service callout action is used in a message flow routing stage to call on the
destination service to perform some action on the message. The destination service returns a
response to the message flow, which is assigned to a local variable. The variable may be
used within the current message flow for conditional branching. Service callouts allow custom
Java code to be invoked from within proxy services.
Service callout action options are:
Service: Target service for the Service Callout action
Invoking: Operation to be invoked on the target service
Configure Soap Body or Configure Payload Parameters
Oracle Service Bus 11g: Design and Integrate Services 4 - 16
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Communication Action:
Service Callout
Callouts enable you to query another service for a value
that can then be used in the message flow.
Service callouts enable more complex message flows.
Service
Operation
Variables
contain
contents of
SOAP body.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The service options that can be selected for a service callout action are:
SOAP Document Style Service Callout
SOAP RPC Style Service Callout
XML Service Callouts
Messaging Service Callouts
SOAP Document Style Service Callout: Messages for SOAP Document Style services
(including EJB document and document-wrapped services) can be constructed as follows:
The variable assigned for the request document contains the SOAP body.
The variable assigned for the SOAP request header contains the SOAP header.
The response must be a single XML document; it is the content of the SOAP body plus
the SOAP header (if specified).
SOAP RPC Style Service Callout: Messages for SOAP RPC Style services (including EJB
RPC services) can be constructed as follows:
Request messages are assembled from message context variables.
Response messages are assembled as follows:
- The output content is the content of the SOAP header (if a SOAP header is
specified).
- Part as element: The output content is the child element of the parameter; there is
at most one child element.
- Part as simple/complex type: The output content is the parameter itself.
XML Service Callouts: Messages for XML services can be constructed as follows:
The request message is the content of the variable assigned for the request document.
The content of the request variable must be a single XML document.
The output document is the response message.
Messaging Service Callouts (in the case of messaging services):
The request message is the content of the request variable. The content can be simple
text, XML, or binary data represented by an instance of <binary-content
ref=.../> reference XML.
The response messages are treated as binary, so the response variable will contain an
instance of <binary-content ref= ... /> reference XML, regardless of the
actual content received.
For more information about the Service Callout Configuration Options, refer to the following:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/proxy_actions.htm#CJAJA
CJE
Oracle Service Bus 11g: Design and Integrate Services 4 - 17
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The transport headers action enables you to set, delete, or pass through the headers in
$inbound or $outbound. If you set or delete these headers, and if you then log $inbound
or $outbound, you can see the effects of your changes.
However, when the message is sent, the OSB binding layer may modify or remove some
headers in $inbound or $outbound, and the underlying transport may, in turn, ignore some
of these headers and use its own values.
The two options with the Transport Header node are:
Pass all Headers through Pipeline: Specifies that at run time, the transport headers
action passes all the headers from the inbound message to the outbound message (or
vice versa). Every header in the source set of headers is copied to the target header set,
overwriting any existing values in the target header set.
Copy Header from Inbound Request and Copy Header from Outbound Response:
Specify that at run time, the transport headers action copies the specific header with
which this option is associated from the inbound message to the outbound message (or
vice versa). Additionally, you can add your own custom headers with the Transport
Header node.
Oracle Service Bus 11g: Design and Integrate Services 4 - 18
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Communication Action:
Transport Headers
A transport header action sets the transport header values in
messages.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The available transport header action options are:


- Direction
- Pass All Headers
- Headers
- Headers: Action
Comment: Used to add a comment (if necessary)
Namespaces: Displays a list of defined namespaces and also enables you to create a
new namespace
Variables: Displays a list of defined context variables and also enables you to create a
new variable
Oracle Service Bus 11g: Design and Integrate Services 4 - 19
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In the for-each action properties, you can specify:


The For Each variable
An XPath expression that specifies where in the structure of the containing context
variable the variable specified in the For Each Variable field is located
The context variable containing the variable on whose contents the for-each actions
will be executed
The index variable (the current number of iterations in the loop)
The count variable (the total number iterations)
The condition in an if action or an if-else action contains one of the tests for following
alternative paths in the flow.
Using the raise-error action options, you can specify the error code and error message.
The reply action can be used in the request, response, or error pipeline. You can configure
it to result in a reply with success or failure.
Oracle Service Bus 11g: Design and Integrate Services 4 - 20
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Flow Control Actions
Action Description
for-each Iterates over a sequence of values and executes a block of
actions
if-then Performs an action or set of actions conditionally, based on the
Boolean result of an XQuery expression
raise-error Raises an exception with a specified error code (a string) and
description
reply Specifies that an immediate reply is sent to the invoker
skip Specifies that the execution of the current stage is skipped at
run time and the processing proceeds to the next stage in the
message flow
resume Resumes message flow after an error is handled by an error
handler
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: d
Explanation: A service callout action configures a synchronous (blocking) callout to a proxy or
business service that is registered with Oracle Service Bus.
Oracle Service Bus 11g: Design and Integrate Services 4 - 21
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Which stage node communication action enables you to query
another service for a value?
a. Dynamic publish
b. Publish table
c. Transport header
d. Service callout
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The assign action has two parts. The first part is the expression that will be used to create a
value (this could be an XML fragment, complete XML, or just a string). The other part is the
variable where the result of the expression will go. This variable could be one of the
predefined context variables or it could be a user-defined variable.
The delete node is used if you need to route a message or execute a callout, and if you need
to remove a node or set of nodes before the message is sent.
Insert actions are very useful for modifying the content of a message. For an insert action, you
specify the XQuery expression to create the data that needs to be inserted at a specified
location.
For a rename action, the following properties are configured:
XPath: An XPath expression used to specify the data (in the named variable) that will
be renamed
In Variable: The context variable that holds the element that you want to rename. Enter
the name of the variable in this field.
Oracle Service Bus 11g: Design and Integrate Services 4 - 22
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Message Processing Actions
Action Description
assign Assigns the result of an XQuery expression to a context variable
delete Deletes a context variable or a set of nodes specified by an XPath expression
insert Inserts the result of an XQuery expression at an identified place relative to nodes
selected by an XPath expression
Java callout Invokes a Java method from the pipeline
rename Renames elements selected by an XPath expression without modifying the
content of the element
replace Replaces a node or the content of a node specified by an XPath expression
MFL transform Converts non-XML to XML, or XML to non-XML, in the pipeline
validate Validates elements selected by an XPath expression against an XML schema
element or a WSDL resource
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Localname: A local name to use to rename the selected elements. Enter the local name
in this field.
Namespace: A namespace to use when renaming the selected elements. Enter the
namespace in this field.
You can use a replace action to replace simple values, elements, and even attributes. An
XQuery expression that returns nothing is equivalent to deleting the identified nodes or
making them empty, depending on whether the action is replacing entire nodes or only node
contents. The following properties can be configured:
XPath: The XPath expression used to specify the data (in the named variable) that will
be replaced
In Variable: The name of the context variable
Expression: The XQuery expression used to create the data that replaces the data
specified by XPath in the named variable
When you finish editing the XQuery expression, select one of the following options:
Replace entire node: To specify that the nodes selected by the XPath expression you
defined are replaced along with all of its contents
Replace node contents: To specify that the node is not replaced (only the contents are
replaced)
Oracle Service Bus 11g: Design and Integrate Services 4 - 23
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

MFL is an Oracle proprietary language that is used to define rules to transform formatted
binary data into XML data. An MFL document conforms to mfl.dtd, which includes elements
and attributes used to describe each field of data, as well as groupings of fields (groups),
repetition, and aggregation.
You use Oracle Format Builder to create MFLs. When you define the hierarchy of a binary
record, the layout of fields, and the grouping of fields and groups, the information is saved as
an MFL document that can then be used to perform runtime translations. You can also use an
MFL document in Format Builder to generate the corresponding document type definition
(DTD) that describes its content model.
MFL can be used as the request/response data type of a messaging service proxy or
business service.
Oracle Service Bus 11g: Design and Integrate Services 4 - 24
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Message Format Language
A Message Format Language (MFL) document is a
specialized XML document that is used to describe the
layout of binary data.
MFL is a proprietary Oracle format.
You can create MFL documents by using Oracle Format
Builder.
Importing an MFL
file resource
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Apply MFL Transformation: This specifies the type of transform to be applied (XML to
non-XML or non-XML to XML).
on <Expression>: This is the variable on which the MFL transformation action is to be
performed. This input must be text or binary when transforming to XML and must be
XML when transforming to non-XML. Binary content in the message context is
represented by the binary content XML element. This XML should be the result of the
XQuery expression when the input needs to be binary.
MFL Resource: Select this option to perform an MFL transform action by using a static
MFL resource.
MFL Resource From: Select this option to specify an MFL resource that will perform
the transform action.
Variable: This is the name of the variable to which the result of this transform action is
to be assigned. The result is a binary content XML element.
The graphic in the slide shows a sample MFL transform action in Oracle Service Bus.
Oracle Service Bus 11g: Design and Integrate Services 4 - 25
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Using MFL
An MFL Transform node enables you to convert from XML to
non-XML data (and vice versa).
Apply MFL Transformation
On <Expression>
MFL Resource
Variable
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: b
Explanation: A Message Format Language (MFL) document is a specialized XML document
used to describe the layout of binary data. It is an Oracle proprietary language used to define
rules to transform formatted binary data into XML data.
Oracle Service Bus 11g: Design and Integrate Services 4 - 26
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Which of the following is a proprietary Oracle format?
a. XQuery
b. MFL
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In a message flow, use the alert action to generate alerts based on message context in a
pipeline, to send to an alert destination. An alert destination must be created before you can
use it. Unlike service-level agreement (SLA) alerts, notifications generated by the alert action
are primarily intended for business purposes, or to report errors, and not for monitoring
system health. If pipeline alerting is not enabled for the service or at the domain level, the
configured alert action is bypassed during message processing. The alert action options that
can be configured are XQuery expression, the severity level of the alert, and the destination of
the alert.
In a message flow, use the log action to construct a message to be logged and to define a set
of attributes with which it will be logged. The log action properties that can be configured are
the message context to be logged, annotation, and severity of the log action.
Severity options are:
Debug: Provides a description of the low-level activity within the application
Info: Used for reporting normal operations; a low-level informational message
Warning: Indicates that a suspicious operation or configuration has occurred, but it
might not affect normal operation
Oracle Service Bus 11g: Design and Integrate Services 4 - 27
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Stage Node Reporting Actions
Action Description
alert Sends an alert notification based on pipeline message context
log Constructs a message to be logged
report Enables message reporting for a proxy service
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Error: Specifies the occurrence of a user error. The system or application can handle
the error with no interruption and limited degradation of service.
In a message flow, use the report action to enable message reporting for a proxy service.
Reporting action options are:
Expression: The XQuery expression used to create the data that will be reported
Search Keys: When you finish editing the XQuery expression, click Add a Key to add
one or more key-value pairs to be used to extract key identifiers from any message
context variable or message payload. The keys are a convenient way to identify a
message.
Oracle Service Bus 11g: Design and Integrate Services 4 - 28
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle XQuery Mapper enables you to integrate heterogeneous applications rapidly. For
example, XML data that is valid against one schema can be converted to XML that is valid
against a different schema. The data can be based on XML schemas, WSDL files, and MFL
files.
The output of XQuery Mapper is a query in the XQuery language, which is defined by the
World Wide Web Consortium (W3C).
Oracle Service Bus 11g: Design and Integrate Services 4 - 29
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Oracle XQuery Mapper
Oracle XQuery Mapper is a graphical mapping tool that
enables you to transform data among XML, non-XML, and
Java data types.
Oracle Service Bus supports data transformation for the
following versions of XQuery:
XQuery 2004: Graphical design view (XQuery Mapper),
source view, and test view
XQuery 2002: Source view and test view
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You can use XQuery Mapper to transform data among XML, non-XML, and Java data types.
When you select the Simple source type, you can transform the standard schema types (such
as Boolean, byte, double, float, integer, long, short, string, and date) to any other required
target data format.
A data transformation can have multiple input types, but only one target type.
The graphic in the slide shows that both source XML data (which is valid to a source XML
schema) and source non-XML data (valid to an MFL schema) can be transformed by a data
transformation built in the Eclipse development environment. The output is called the target
XML data and is valid to the target XML schema.
Oracle Service Bus 11g: Design and Integrate Services 4 - 30
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Mapping Data
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

When you create a transformation, you are prompted to list the different source types. These
can be XML sources, non-XML sources, or simple types (integer, string, and so on). Then you
need to define what the target type of the resulting transformation will be; you may have only
one target type.
You can perform the following types of data transformations:
Basic element transformations: Mapping a source element to a target element
Basic attribute transformations: Mapping a source attribute to a target attribute
Complex transformations: Mapping a complex source (for example, a repeating
element) to a complex target (for example, a nonrepeating element)
The graphic in the slide shows the Source Types and Target Types Wizard that is used to
select the source type and target type for the transformation.
Oracle Service Bus 11g: Design and Integrate Services 4 - 31
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Creating a Transformation
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Basic element transformation involves mapping a source element to a target element. The
source and target elements may have the same name, type, or scope. The following are
examples of the types of basic element transformation that you can perform:
Element to element: A source element is mapped to a target element.
Element combination: Multiple source elements are combined to create a single target
element.
Element explosion: XQuery string functions are exploded from a single source element
to multiple target elements.
Complex transformations involve mapping a complex source (for example, a repeating
element) to a complex target (for example, a nonrepeating element). The following are some
examples of complex transformations:
Repeating group to repeating group: The source contains a variable number of
instances of a group of elements; each source instance is mapped to an instance of the
target group.
Repeating group to nonrepeating element: The source contains a variable number of
instances of a group of elements; each source group is mapped to an instance of the
target element.
The graphic in the slide shows a graphical map of the transformation.
Oracle Service Bus 11g: Design and Integrate Services 4 - 32
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Mapping a Transformation
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In a message flow, the point at which you specify a transformation depends on whether the
message format relies on target servicesthat is, the message format must be in a format
that is acceptable by the route destination. This applies when the transformation is performed
in a route node or in one of the publish actions.
Publish actions identify a target service for a message and configure how the message is
packaged and sent to that service. OSB also provides publish table actions. A publish table
action consists of a set of routes wrapped in a switch-style condition table. It is a shorthand
construct that enables different routes to be selected based on the results of a single XQuery
expression.
You perform the transformation on the response or request message regardless of the route
destination. In this case, you can configure the transformations in the request or response
pipeline stages.
The graphic in the slide shows the wizard used to select the file.
Oracle Service Bus 11g: Design and Integrate Services 4 - 33
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Using XQuery File in OSB
XQuery expressions can be used in most of the action
types.
In the Expression Editor, click XQuery Resource instead of
using the Expression tab.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 4 - 34


Custom XPath functions are used in XQuery Expression Editors in the development or
run-time tooling, such as in proxy service message flows, Split-Joins, and XQuery Mapper
transformations. The built-in functions that Oracle Service Bus provides use this function
framework, so you can use those existing registration resources for guidance. You can find
these files at the following location:
OSB_ORACLE_HOME/config/xpath-functions/
You can include custom functions in both inline XQuery expressions and XQuery resources,
just as you would use functions provided by Oracle Service Bus.
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Custom XPath Functions
Oracle Service Bus provides an extensible framework for
creating custom XPath functions that you can use in the
XQuery Expression Editors.
OSB XQuery
expression/resource
Oracle XQuery 1.0
2004 draft engine
XQ Standard functions
fn:concat
fn:abs
OSB XSLT resource
XSLT Engine
OSB built-in extensions
fn-bea:uuid
fn-bea:IsUserIn Role
Custom functions
ns0:myfunc
..
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

When you write Java code, follow these rules:


Only a subset of Java data types is supported (for example, strings, primitives, dates,
times, XMLObject, and DOM Element).
Only single-dimensional arrays of supported types are allowed.
Functions with side effects should not be used (for example, DB updates or
starting/committing TX) because the XQuery optimizer might reorder or eliminate certain
calls.
Functions with void return are not supported. Using Java callout is more appropriate in
these scenarios.
The content of the configuration XML file (for each new function) includes:
Category ID (key in .properties)
Group ID (key in .properties) [This is optional.]
Name
Namespace
Java signature
Deterministic or not (always produces same result for same arguments)
Oracle Service Bus 11g: Design and Integrate Services 4 - 35
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Creating a Custom XPath Function
Write Java code to
implement function.
Compile and package the
corresponding .class
files in a JAR file.
Place the JAR file in the
OSB XPath-functions
directory.
Add new .xml and
.properties files to the
XPath-functions directory.
Restart OSB servers.
1
2
3
4
5
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

OSB reads the content of the ALSB_HOME\config\xpath-functions directory and then


does the following:
For each .xml file it finds, it goes through the list of functions in it and registers them
with XQuery engine.
Each function gets an XQuery signature based on its Java signature.
For each .jar file it finds, it adds it to classpath when evaluating results of the XQuery
expressions.
Oracle Service Bus 11g: Design and Integrate Services 4 - 36
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Registering a Custom Function
OSB Runtime XQuery Engine
.properties
JAR file JAR file
osb-built-in.xml
.properties
My-func.xml
%ALSB_HOME%\
config\xpath-
functions directory
Register new
functions.
Added to OSB
classpath
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 4 - 37


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to describe:
Communication actions you can add to a route or a stage
in a message flow
Flow control actions you can add to a route or a stage in a
message flow
Message processing actions you can add to a stage in a
message flow
Reporting actions you can add to a stage in a message
flow
XQuery mapping and transformations
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 4 - 38


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Practice 4 Overview:
Message Flow Actions
This practice covers the following topics:
Creating and configuring a routing table
Creating and configuring a publish node
Creating and using XQuery transformations in OSB
Using the MFL transform action
Using a service callout
Using a Java callout
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Message Flow Best Practices
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 5 - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to:
Understand and use the Split-Join pattern
Explain the difference between a static Split-Join and
a dynamic Split-Join
Describe the Split-Join flow creation process
Configure a dynamic routing action
Explain the dynamic routing technique
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Split-Join feature in Oracle Service Bus enables you to split a service payload, such as
an order, into individual messages for concurrent processing. Concurrent processing, as
opposed to sequential processing, greatly improves service performance. Split-Join achieves
this task by splitting an input message payload into submessages (split), routing them
concurrently to their destinations, and then aggregating the responses into one overall return
message (join). This process of payload splitting and response aggregation is called a Split-
Join pattern.
You design a Split-Join in the Eclipse Split-Join Editor and then export it to the Oracle Service
Bus Console for testing and production.
Oracle Service Bus 11g: Design and Integrate Services 5 - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Split-Join Pattern
Split-Join is a mediation pattern that can be used by a
transport-typed business service in an Oracle Service Bus
message flow.
Split-Join allows you to send message requests to multiple
services concurrently.
Message
Payload
Message
Message
Message
Aggregation
Split
Split
Join
Join
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Split-Joins are particularly useful for optimizing overall response times in scenarios where
payloads delivered by faster systems are directed to responding services on slower systems.
Without Split-Join, individual messages in a payload are normally resolved in sequential order
by the recipient, which can take a long time if the responding system is slow. The overall
response time is the sum of the individual response times for each message.
With Split-Join, multiple messages are processed simultaneously, which reduces the burden
on the responding system and greatly enhances response times. The overall response time is
roughly that of the longest individual messages response time plus some minor system
overhead.
The graphic in the slide shows an order being split by OSB.
Oracle Service Bus 11g: Design and Integrate Services 5 - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Split-Join Order: Example
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You can use the Static Split-Join pattern to create a fixed number of message requests (as
opposed to an unknown number). For example, a customer places an order for a cable
package that includes three separate services: Internet service, TV service, and telephone
service. In the Static pattern, you execute all three requests in separate parallel branches to
improve the performance time over that of a standard sequential execution.
You can use the Dynamic Split-Join pattern to create a variable number of message requests.
For example, a retailer places a batch order containing a variable number of individual
purchase orders. In the Dynamic pattern, you parse the batch order and create a separate
message request for each purchase. As in the Static pattern, these messages can then be
executed in parallel for improved performance.
Oracle Service Bus 11g: Design and Integrate Services 5 - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Split-Join Patterns
Split-Join Patterns
Static Split-Join Dynamic-Split Join
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A Split-Join configuration is created in Eclipse.


When you select the WSDL operation on which to create the Split-Join, the skeleton of the
newly created Split-Join appears in the Split-Join Editor. It consists of a Start node, a Receive,
and a Reply.
The graphic in the slide illustrates how to specify the operation step in the Split-Join Creation
wizard.
Oracle Service Bus 11g: Design and Integrate Services 5 - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Creating a Split-Join Configuration
Every Split-Join is
based on a Web
Services Description
Language (WSDL)
operation.
When you first create a
Split-Join, you are
asked to browse to the
appropriate WSDL file
and select this
operation as part of the
creation process.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Start node contains both a request variable and a response variable that have been
determined by the WSDL operation initially selected. The Receive receives the incoming
request message. The Receive node requires no further configuration.
The graphic in the slide shows the properties of a Split-Join Receive node in Eclipse.
Oracle Service Bus 11g: Design and Integrate Services 5 - 7
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Receive Node
A Receive is generated whenever you create a new Split-Join.
The Receive places incoming request data in a variable and
makes the content available for later nodes to use.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Reply can send either a Response or a Fault back to the client, depending on how you
configure the variable. The Fault options that are available vary depending on whether the
Reply is global or local.
A global Reply (that is, a Reply at the end of a Split-Join) can never have a SOAP Fault
but can have a WSDL Fault. This is why the SOAP Fault option is always disabled.
A local Reply (that is, a Reply attached to an error handler) can have either a WSDL
Fault or a SOAP Fault. WSDL Faults are available only if they are defined in the WSDL
on which the Split-Join is based. The SOAP Fault option is always available if one has
been previously defined in the error handler.
Note: Switching back and forth between the Response and Fault options will clear either
configuration. For instance, if you have previously selected Propagate SOAP Fault for the
Fault configuration and you then switch to the Response configuration, Propagate SOAP
Fault is deselected.
The graphic in the slide shows the properties of the Reply node in Eclipse.
Oracle Service Bus 11g: Design and Integrate Services 5 - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Reply Node
A global Reply is generated whenever you create a new
Split-Join.
The global Reply sends a response back to the invoking
OSB message flow. However, you may also create a local
Reply to an error handler.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Parallel node is where you put your processing logic for the Split-Join flow. A Parallel
creates a fixed number of configured parallel branches. Each branch has its own scope,
which in turn can contain any number of nodes. Configuring a Parallel can include the
following tasks:
Add nodes
Add general information
The graphic in the slide shows a Parallel node with two branches in Eclipse.
Oracle Service Bus 11g: Design and Integrate Services 5 - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Parallel Node
The Parallel node is a placeholder for a fixed number of
processing branches, each with its own scope.
Two branches are generated by default.
Adds more scopes
(branches)
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Assign operations include Assign, Copy, Delete, Insert, Java Callout, Log, and Replace.
Every Assign is composed of one or more of these operations, which you can add to the
Assign by using the Design Palette.
In addition, each operation has its own configuration dialog or editor.
Note: The Assign operations in the Split-Join Editor are essentially the same as the
corresponding actions in the OSB Console. However, one important difference is that when
you use the XQuery\XSLT or XPath Editors to edit expressions in the Split-Join context, only
the variables and namespaces that are internal to the Split-Join are available.
Assign: Assign the result of an XQuery expression to a variable.
Copy: Copy the information specified by an XPath 1.0 expression from a source
document to a destination document.
Delete: Delete a set of nodes specified by an XPath expression.
Note: Unlike the OSB delete, only an XPath expression may be deleted in a Split-Join,
not the entire variable.
Oracle Service Bus 11g: Design and Integrate Services 5 - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Assign Node
The Assign node is used for data manipulation, including
initializing and updating a variable. It is composed of a set of
one or more operations that can be added and/or edited in the
Assign toolbar.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Insert: Insert the result of an XQuery expression at an identified place relative to the
nodes selected by an XPath expression.
Java Callout: Invoke a Java method for processing (such as validation, transformation,
and logging).
Log: Log Split-Join data at a specified severity to the server log file.
Replace: Replace a node or the content of a node specified by an XPath expression.
The graphic in the slide shows the Assign operations in Eclipse.
Oracle Service Bus 11g: Design and Integrate Services 5 - 11
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Invoke Service invokes a WSDL-based, non-transport-typed business service, a WSDL-


based proxy service, or another Split-Join.
The graphic in the slide shows the properties of the Invoke Service node in Eclipse for
WebLogic.
Oracle Service Bus 11g: Design and Integrate Services 5 - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Invoke Service Node
The Invoke Service is used to invoke external, WSDL-
based business or proxy services.
You must select an operation on which to base the Invoke
Service. You must select this operation before you can
configure input and output variables
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Input and Output variables can be either of the following:


Global: Available within the entire Split-Join
Local: Available within a particular context scope
Oracle Service Bus 11g: Design and Integrate Services 5 - 13
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Input and Output Variables
An Invoke External Service requires both input and output
variables, unless it is a one-way invocation.
Specifying the
Input variable for
an Invoke Service
Specifying the
Output variable for
an Invoke Service
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To generate the business service from the Split-Join (.flow) menu:


1. Right-click the Split-Join (.flow) file in the Eclipse for WebLogic Project Explorer to
open the Split-Join menu.
2. Select Oracle Service Bus.
3. Select Generate Business Service.
4. Name the new service and save it in a project.
After you create the business service, you can export the Split-Join if it has no errors.
Note: It is a helpful practice to place the associated business service in the same OSB project
as the Split-Join. It can also be useful to give the business service the same name as the
Split-Join so that they are easily correlated.
Oracle Service Bus 11g: Design and Integrate Services 5 - 14
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Exporting the Split-Join Flow
A Split-Join is used by a particular transport-typed
business service.
If you do not have an appropriate business service,
you must create one before you can export or test your
Split-Join. There are two ways to create a business
service:
Create the business service manually in Eclipse for
WebLogic or in the OSB Console.
Generate the business service from the Split-Join (.flow)
menu.
Creating the business
service from Eclipse
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

1. Create a new Split-Join based on the WSDL operation that you want to use.
2. The first Assign contains an Assign operation that prepares the Response variable in a
form such that the later nodes can work on the data in it (that is, Copy, Insert, Assign,
Replace, and Delete the data). This output message is relayed to the final Reply node in
the Split-Join and, in turn, returned to the original client.
3. Add a Parallel node and add the required branches.
4. The first Assign in each Parallel branch copies the data into a variable. The Assigns are
the same for each branch and would be for additional branches as well.
5. Call the external service to execute the business logic.
6. The final Assigns take the results of the external service invocations and put them into
the output message by using a Replace operation. The aggregated response is then
sent to the original client in the final Reply node, which requires no further configuration.
7. Generate a business service for your Split-Join flow, and then test it in an OSB
configuration.
Oracle Service Bus 11g: Design and Integrate Services 5 - 15
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Split-Join Flow Creation Process
Create a new Split-
Join flow.
Add an Assign.
Add a Parallel node.
Add Assign actions
for each branch.
Add an Invoke
External Service.
Add an Assign action
for each branch.
Export and test.
1
2
3
4
5
7
6
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a
Explanation: A Split-Join Configuration is created in Eclipse for WebLogic. After you select the
WSDL operation on which the Split-Join is based, the skeleton of the newly created Split-Join
appears in the Split-Join Editor.
Oracle Service Bus 11g: Design and Integrate Services 5 - 16
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Every Split-Join is based on a WSDL operation.
a. True
b. False
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

With dynamic routing, the URL that the client calls is generic. It is then up to the proxy service
to determine the correct service that it should route to.
The graphic in the slide shows a proxy service determining where to route a message by
using dynamic routing.
Oracle Service Bus 11g: Design and Integrate Services 5 - 17
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Dynamic Routing
Dynamic routing provides another layer of abstraction from the
client to the service bus.
Client
OSB
Proxy
BusServA
BusServB
Determine
Service A or B
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

There are two techniques that can be used with dynamic routing:
Technique 1: In a message flow pipeline, design an XQuery expression to dynamically
set the fully qualified service name in OSB and use the dynamic Route or dynamic
Publish actions.
Technique 2: Configure a proxy service to route or publish messages to a business
service. Then, in the request actions section for the Route action or Publish action, add
a Routing Options action that dynamically specifies the URI of a service.
Oracle Service Bus 11g: Design and Integrate Services 5 - 18
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Dynamic Routing Techniques
Dynamic routing
techniques
Technique 1: Design an
XQuery expression to
dynamically set the fully
qualified service name in OSB.
Technique 2: Add a
routing options action that
dynamically specifies the
URI of a service.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To use the dynamic Route action, you need the fully qualified name of the service in OSB.
Oracle Service Bus 11g: Design and Integrate Services 5 - 19
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Technique 1
An XML file or the XQuery resource can be maintained
easily.
At run time, you provide the entry in the routing table that
will determine the routing or publishing destination of the
proxy service.
The XML file or the XQuery resource contains a routing
table that maps a logical identifier (such as the name of a
company) to the physical identifier (the fully qualified name
of the service in OSB).
The logical identifier, which is extracted from the message,
maps to the physical identifier, which is the name of the
service that you want to invoke.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

This slide shows a sample routing file. Map each logical name that is used, but map a client
service to the actual service that should be called.
In a pipeline, the logical identifier is obtained with an XPath into the message. You assign the
XML table in the XQuery resource to a variable. You implement a query against the variable
in the routing table to extract the physical identifier based on the corresponding logical
identifier. Using this variable, you can invoke the required service. The following slides
describe how to implement dynamic routing.
Oracle Service Bus 11g: Design and Integrate Services 5 - 20
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Sample XML File
<routing>
<row>
<logical>Oracle</logical>
<physical>default/goldservice</physical>
</row>
<row>
<logical>ABC Corp</logical>
<physical>default/silverservice</physical>
</row>
</routing>
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Service: An XQuery expression that defines the route to be taken by a message. Enter an
XQuery expression, the result of which is similar to:
<ctx:route>
<ctx:service isProxy='true'>{$service}</ctx:service>
<ctx:operation>{$operation}</ctx:operation>
</ctx:route>
If a proxy service is being invoked, the isProxy attribute should be set to true. The service
name is the fully qualified service name. The operation element is optional.
The graphic in the slide shows the creation of a dynamic routing action in the OSB Console.
Oracle Service Bus 11g: Design and Integrate Services 5 - 21
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Dynamic Routing Action
In a message flow, use a dynamic routing action to assign
a route for a message based on the routing information
available in an XQuery resource.
This is a terminal action, which means that you cannot add
another action after this one. However, this action can
contain request and response actions.
Service
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

This technique is used when the overview of the interface is fixed. The overview of the
interface includes message types, port types, and binding; it excludes the concrete interface.
The concrete interface is the transport URL at which the service is located.
Oracle Service Bus 11g: Design and Integrate Services 5 - 22
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Technique 2
Configure a proxy service to route or publish messages to
a business service.
In the request actions section for the route action or
publish action, add a routing options action that
dynamically specifies the URI of a service.
With this technique, to send usernames and passwords in
its outbound requests, the proxy service uses the service
account of the statically defined business service,
regardless of the URI to which the request is actually sent.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 5 - 23


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to:
Use the Split-Join pattern
Explain the difference between a static Split-Join and
a dynamic Split-Join
Describe the Split-Join flow creation process
Configure a dynamic routing action
Explain the dynamic routing technique
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 5 - 24


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Practice 5 Overview:
Message Flow Best Practices
This practice covers the following topics:
Implementing the Split-Join pattern
Creating a Split-Join flow
Configuring a proxy service to use a Split-Join flow
Using dynamic routing
Configuring a routing file
Configuring a proxy service to use dynamic routing
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Transports in Oracle Service Bus
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 6 - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to:
Describe SOA-DIRECT transport
Describe JCA transport
Describe Representational State Transfer (REST)
Configure a proxy service to use REST
Test a proxy service by using REST
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle SOA Suite provides a direct binding framework that lets you expose Oracle SOA Suite
service components in a composite application.
The Oracle Service Bus SOA-DIRECT transport interacts with exposed services through the
SOA direct binding framework. The SOA service components interact in the service bus layer
and leverage the capabilities and features of Oracle Service Bus.
Oracle Service Bus 11g: Design and Integrate Services 6 - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SOA-DIRECT Transport
The SOA-DIRECT transport provides native connectivity
between Oracle Service Bus and Oracle SOA Suite service
components.
Client
Oracle Service Bus
Proxy
SOA-
DIRECT
Business
SOA Composite
Direct
Binding
Services
Request
Request
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The SOA-DIRECT transport uses only WS-Addressing for message correlation in


synchronous and asynchronous communications. The transport automatically generates
ReplyTo properties for asynchronous callbacks.
The SOA-DIRECT transport supports one-way SSL. You can provide identity propagation
with the SOA-DIRECT transport by passing the callers subject through the service or with a
service account bound to the service. Because the SOA-DIRECT transport deals with only
normalized, abstract messages, the transport does not support WS-Security.
The SOA-DIRECT transport recognizes connection and application errors, letting you
configure the appropriate retry settings in the transport configuration. The transport throws
generic errors for errors that are not related to either connections or applications.
Oracle Service Bus 11g: Design and Integrate Services 6 - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Features of SOA-DIRECT Transport
The SOA-DIRECT transport supports the following features:
Invocation of any SOA binding component services
through Java remote method invocation (RMI)
WS-Addressing
Identity propagation
Transaction propagation
Attachments
Optimized RMI transport for invoking SOA services
High-availability and clustering support
Failover and load balancing
Connection and application retries on errors
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Guidelines for invoking an Oracle SOA direct binding service from a client through Oracle
Service Bus are as follows:
Create a SOA-DIRECT business service in Oracle Service Bus that represents the SOA
service component that you want to invoke:
1. In Oracle Service Bus, create a WSDL resource based on the corresponding
Oracle SOA direct binding service WSDL. You can locate the SOA direct binding
service WSDL in Oracle JDeveloper by using the SOA Resource Browser.
2. Create a new business service.
3. Select WSDL Web Service as the service type.
4. Select the WSDL resource you created, and then choose the appropriate port or
binding.
5. Select the SOA-DIRECT transport in the business service configuration.
6. Set the endpoint URI.
7. Configure the remainder of the business service.
Create a proxy service in Oracle Service Bus that invokes the business service. Choose
the transport type that is used by the client.
If you are using stateful services, ensure that messages are associated with the correct
conversation.
Oracle Service Bus 11g: Design and Integrate Services 6 - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Synchronous Invocation of
SOA Composite Components
The SOA-DIRECT transport can invoke any component in a
SOA composite that is exposed as a direct binding service.
Client
Oracle Service Bus
SOA
Composite
Request
One-way Or Sync
Request/Response
Business Service SOA-
DIRECT Transport
Proxy Service
SOA Direct
Binding
Framework
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To invoke an SB proxy service, the SOA service component must use a direct binding
reference of target type Oracle Service Bus.
The guidelines for invoking an external service from a SOA composite using direct binding
references are:
Create a business service in Oracle Service Bus that represents the external service
that you want to invoke. Choose the transport type that is supported by this service.
Note: To learn more about business service configuration details, refer to the following
documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/ui_ref.htm#i1342761
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/transports.htm#BEIF
HBAI
Oracle Service Bus 11g: Design and Integrate Services 6 - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Synchronous Invocation from a SOA Composite
A SOA composite can invoke any Oracle Service Bus SB
WSDL-based proxy service.
Oracle Service Bus
SOA
Composite
Business Service SOA-
DIRECT Transport
Proxy Service
SB Transport
SOA Direct
Binding
Framework
Service
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Create an SB proxy service in Oracle Service Bus that invokes the business service:
1. Create a WSDL resource to be used by the proxy that invokes the business
service.
2. Create a new proxy service.
3. Select WSDL Web Service as the service type.
4. Select the WSDL for the proxy service, and then select the desired port or binding.
5. Select the SB transport in the proxy service configuration.
6. Configure the remainder of the proxy service.
Note: To learn more about proxy service configuration, refer to the following
documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/ui_ref.htm#i134
2770
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/sb.htm#BDCJE
JCJ
Oracle Service Bus 11g: Design and Integrate Services 6 - 7
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The SOA-DIRECT transport can invoke asynchronous SOA service components that are
exposed as direct binding services. The guidelines for invoking an Oracle SOA direct binding
service asynchronously from a client through Oracle Service Bus are:
On the inbound client side, create the OSB artifacts to interact with the client:
- A request proxy service that invokes the outbound SOA-DIRECT business service
- A callback business service that handles the callback to the client. Use the
transport type used by the client
On the OSB outbound side, create the artifacts to interact with the SOA composite:
- A request SOA-DIRECT business service that makes the request to the Oracle
SOA direct binding service, exposing the asynchronous service component that
you want to invoke
- A callback SB proxy service that handles the callback from the direct binding
service and invokes the inbound callback business service
The graphic in the slide illustrates an asynchronous communication pattern between a client
and an Oracle SOA composite through Oracle Service Bus using a direct binding service, the
SOA-DIRECT transport, and the SB transport.
For more information about using SOA Suite services with Oracle Service Bus, refer to the
following documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/soa.htm#BABCBCJD
Oracle Service Bus 11g: Design and Integrate Services 6 - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Asynchronous Invocation of a SOA Composite
Client
SOA
Composite
Oracle Service Bus
Business Service
Proxy Service
Business Service
SOA -DIRECT
Transport
Proxy Service SB
Transport
Request
Callback
SOA Direct
Binding
Framework
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

An asynchronous SOA service component in a SOA composite can invoke external services
through Oracle Service Bus. To do so, the SOA service component must use a direct binding
reference of target type Oracle Service Bus. The guidelines for invoking an external service
asynchronously from an Oracle SOA direct binding reference through Oracle Service Bus are:
In OSB, on the inbound side, create the artifacts to interact with the SOA composite:
- A request SB proxy service that receives the SOA direct binding reference request
- A callback SOA-DIRECT business service that handles the callback to the SOA
direct binding reference
On the OSB outbound side, create the artifacts to interact with the external service:
- A request business service that makes the request to the external service
- A callback proxy service that handles the callback from this service.
The graphic in the slide illustrates an asynchronous communication pattern between an
Oracle SOA service component and an external service through Oracle Service Bus using a
direct binding reference, the SB transport, and the SOA-DIRECT transport.
For more information, refer to the following documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/soa.htm#BABCBCJD
Oracle Service Bus 11g: Design and Integrate Services 6 - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Asynchronous Invocation from a SOA Composite
Oracle Service Bus
SOA
Composite
Service
Proxy Service
Business Service
SOA -DIRECT
Transport
Business Service
Proxy Service SB
Transport
Request
Callback
SOA Direct
Binding
Framework
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a
Oracle Service Bus 11g: Design and Integrate Services 6 - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
The Oracle Service Bus SOA-DIRECT transport can invoke
asynchronous SOA service components that are exposed as
direct binding services:
a. True
b. False
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The JCA transport provides native connectivity between Oracle Service Bus and EIS systems,
letting those systems interact in the service bus layer and leverage the capabilities and
features of Oracle Service Bus.
In JCA proxy or business services, the JCA transport works in conjunction with a built-in JCA
adapter framework and JCA-compliant adapters to interact with EIS systems.
JCA proxy services listen for inbound requests from supported JCA adapters, and JCA
business services invoke EIS endpoints through supported adapters.
Oracle Service Bus 11g: Design and Integrate Services 6 - 11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Application Server
Oracle Service Bus
JCA Transport
Oracle Service Bus provides a Java EE Connector Architecture
(JCA) transport that interacts with an Enterprise Information
System (EIS).
JCA Transport
Enterprise
Information System
EIS
Adapter
(JCA
Compliant)
JCA Adapter
Framework
Proxy/Business Service
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The JCA transport supports request-only and synchronous request/response messaging


patterns by using SOAP 1.1.
Oracle JCA adapters transmit header information through Normalized Message properties
(with the exception of the Oracle JCA Adapter for AQs payload header). You cannot map
these Normalized Message properties to SOAP message headers in Oracle Service Bus, but
the Oracle Service Bus transport maps the properties to transport headers.
The JCA transport supports a number of service endpoint properties that you can set in the
JCA proxy or business service configuration.
The JCA transport logs messages by using the Oracle WebLogic Server NonCatalog logger.
JCA adapter framework logs are redirected to the Oracle WebLogic Server log.
The JCA transport supports URI rewriting in a proxy service message flow. URI rewriting is
used to identify the URI of a business service at run time, and is generally used for content-
based routing.
To learn more about the features and characteristics of the JCA transport, refer to the
following documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/jca.htm#i1105149
Oracle Service Bus 11g: Design and Integrate Services 6 - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Features of the JCA Transport
Supports request-only and synchronous messaging
patterns
Transmits header information through Normalized
Message properties
Supports a number of service endpoint properties
Logs messages using the Oracle WebLogic Server
NonCatalog logger
Supports URI rewriting in a proxy service message flow
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

There are limitations to using some JCA adapters with Oracle Service Bus:
Oracle JCA Adapter for FTP and Files: Attachments (large payload support), pre- and
post-processing of files, using a re-entrant valve for processing ZIP files, content
streaming, and file chunked read are not supported with Oracle Service Bus.
Oracle JCA Adapter for AQ: Streamed payload is not supported with Oracle Service
Bus.
Oracle Service Bus 11g: Design and Integrate Services 6 - 13
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Adapters Supported by JCA Transport
Adapter Used for
Oracle Adapter Oracle Applications
Oracle JCA Adapter Oracle Advanced Queuing (AQ)
Oracle JCA Adapter Databases
Oracle JCA Adapter Files
Oracle JCA Adapter FTP
Oracle BAM Adapter Business activity monitoring
Oracle Application Adapters 10g PeopleSoft, SAP R/3, Siebel, JD
Edwards
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

For inbound interactions, the JCA proxy service registers a listener with the associated JCA
adapter endpoint. When an event occurs in the EIS system, where a message is sent to the
JCA proxy, the JCA adapter framework invokes the proxy service with a request-only or
request-response pattern.
On outbound interactions, when a client invokes an EIS service through Oracle Service Bus,
the JCA business service invokes the JCA adapter endpoint through the JCA adapter
framework.
No configuration of the JCA adapter framework is necessary. It is deployed and functions
automatically as you create JCA proxy and business services in Oracle Service Bus and
deploy your adapters as required.
Oracle Service Bus 11g: Design and Integrate Services 6 - 14
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
JCA Adapter Framework
The JCA transport uses the Oracle Service Bus JCA
adapter framework to interact with JCA-compliant adapters
that, in turn, provide connectivity to external EIS services.
The JCA adapter framework abstracts the complexity of
interacting with those adapters, enabling you to focus on
proxy and business service development in Oracle Service
Bus.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Oracle JCA adapters (such as Oracle JCA Adapters for AQ, Database, and Oracle
Applications) are deployed automatically in an Oracle Service Bus domain. (You must
manually install and deploy other supported third-party resource adapters in the Oracle
WebLogic Server Console.)
To configure an already-deployed Oracle adapter (such as AppsAdapter, AqAdapter, or
DbAdapter):
1. Create a data source.
In the Oracle WebLogic Server Console, create and configure a data source to connect
to the EIS database.
2. Configure the deployed resource adapter.
In the Oracle WebLogic Server Console, modify the adapter configuration to use the
data source you created:
a. Go to Deployments > [adapter] > Configuration > Outbound Connection Pools.
Oracle Service Bus 11g: Design and Integrate Services 6 - 15
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
General Configuration of JCA Adapter
Oracle JCA adapters are deployed automatically in an
Oracle Service Bus domain.
The steps to configure an already-deployed Oracle adapter
are:
Create a data source.
Configure the deployed
resource adapter.
1
2
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

b. Create a new connection pool factory based on the new data source. During the
process, designate a location for the connection pool factory Plan.xml file. This file
persists the connection factory configuration settings.
c. After you create the connection pool factory, click its name and modify its properties.
To do this, click in the Properties field for XADataSourceName (for XA data sources)
or datasourceName (for non-XA data sources), enter the name of the data source
you created, and press Enter.
d. Activate your changes in the Change Center.
Oracle Service Bus 11g: Design and Integrate Services 6 - 16
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Representational state transfer (REST) is a software architectural style introduced by Roy


Fielding for distributed hypermedia systems. The REST architecture consists of clients and
servers. The clients initiate requests to servers, and the servers process the requests and
return the responses.
REST requires a uniform interface. It does not permit application-specific interfaces.
A REST-ful web service uses the HTTP interface, which supports four basic application
methods:
GET
POST
PUT
DELETE
Oracle Service Bus 11g: Design and Integrate Services 6 - 17
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Representational State Transfer (REST)
REST can be defined as:
An architectural style that exploits the existing technology
and protocols of the web, including HTTP and XML
An alternative to standards-based web services
development.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A REST-ful web service is a collection of resources. The interface for the web service is
defined by:
The URI for the web service, such as http://www.example.com/resources/documents
The MIME type of the data supported by the web service (usually XML, JSON, or YAML)
- JSON = JavaScript Object Notation
- YAML = YAML Aint a Markup Language
A set of operations supported by the web service using HTTP methods
Oracle Service Bus 11g: Design and Integrate Services 6 - 18
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus provides the following placeholder variables for handling REST-based
requests for inbound and outbound communication:
$inbound or $outbound/transport/request/http:http-method:
For handling HTTP methods such as GET, PUT, HEAD, POST, and DELETE
$inbound or $outbound/transport/request/http:query-string:
For handling query strings in a URL. For example, in the URL
http://localhost:7021/myproxy/weather?operation=temperature&pincode=80439/,
the query string is operation=temperature&pincode=80439.
$inbound or $outbound/transport/request/http:relative-URI:
For handling relative portions of a REST resource URL (relative to the proxy service
URI). For example, in the URL http://localhost:7021/myproxy/weather,
/weather is a relative URL to http://localhost:7021/myproxy.
Oracle Service Bus 11g: Design and Integrate Services 6 - 19
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Support for REST
OSB provides placeholder variables for handling REST-based
requests:
$inbound/transport/request/http:http-method
$outbound/transport/request/http:http-method
$inbound/transport/request/http:query-string
$outbound/transport/request/http:query-string
$inbound/transport/request/http:relative-URI
$outbound/transport/request/http:relative-URI
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

As part of the SOA approach, REST-ful services should reuse existing business services and
simply provide a layer that reformats the normal output (in this case, SOAP) in accordance
with the defined proxy configuration (in this case, text).
Oracle Service Bus 11g: Design and Integrate Services 6 - 20
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Example
In the example in the following slides:
A Movie Retrieval web service exists.
Input: Movie ID
Output: SOAP response with Title, Rating, and ID
An existing OSB proxy service provides a SOAP interface.
An OSB REST-ful proxy service is needed.
Invoked using HTTP GET
Responds with a JavaScript Object Notation (JSON)
document (that is, text)
Should use the existing Movie Retrieval web service
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In the example in the slide, a SOAP request is sent to the standard proxy service, and a
SOAP response is returned.
Oracle Service Bus 11g: Design and Integrate Services 6 - 21
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Standard Proxy Service: Example
Running the SOAP-based OSB proxy service:
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The screenshots in the slide show a standard proxy service configuration. The message flow
map for the proxy service simply routes the incoming request to the Movie Retrieval web
service.
Oracle Service Bus 11g: Design and Integrate Services 6 - 22
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Standard Proxy Service: Example
The configured OSB proxy service:
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The slide describes the steps involved in creating a REST-ful proxy service that returns a
JSON document.
Oracle Service Bus 11g: Design and Integrate Services 6 - 23
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
REST-ful Proxy Service: Example
Create the REST-ful proxy service that returns a JSON (text)
document:
The service is available at the /MovieREST URI.
The Movie ID is provided after the URI.
/MovieRest/1 (for movie ID 1)
/MovieRest/3 (for movie ID 3)
The movie ID is available using
$inbound/ctx:transport/ctx:request/http:rel
ative-URI.
A Java callout (convertToJson) is used to convert the
Movie web service SOAP response document to a JSON
(text) document.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

1. The REST-ful proxy service is called via a client interface.


2. The invoked URL contains the endpoint URL for the REST-ful proxy service as well as
the ID of the request movie. The result is a JSON (text) document.
Oracle Service Bus 11g: Design and Integrate Services 6 - 24
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
REST-ful Proxy Service: Example
1
2
REST-ful
Proxy Service
JSON (text)
Response
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Assign action is used to create an input document (input) in accordance with the input to
the Movie Retrieval web service. Assign uses the expression
{$inbound/ctx:transport/ctx:request/http:relative-URI/text()} to retrieve
the movie ID (1, 2, or 3) from the URL.
The service callout action is used to invoke the Movie Retrieval web service. The resulting
SOAP response is then saved in variable output.
Oracle Service Bus 11g: Design and Integrate Services 6 - 25
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
REST-ful Proxy Service: Example
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A Java callout action is used to convert the SOAP response document into a JSON (text)
document. The new jsonResult text document is then returned as the proxys response
(using the Replace action).
Oracle Service Bus 11g: Design and Integrate Services 6 - 26
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
REST-ful Proxy Service: Example
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In the code shown in the slide, the required try/catch block has been removed for brevity.
Oracle Service Bus 11g: Design and Integrate Services 6 - 27
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
REST-ful Proxy Service: Example
The convertToJson Java service uses XML utilities to
convert the SOAP document to a JSON document.
public static String convertToJson(XmlObject object)
{
System.out.println( object.xmlText() );
StringBuffer sb = new StringBuffer( "{" );
XmlObject[] rootNode = object.selectChildren(QNameSet.ALL);
XmlObject[] children = rootNode[0].selectChildren(QNameSet.ALL);
for( int i=0; i<children.length; i++){
XmlObject current = children[i];
Node node = children[i].getDomNode();
XmlCursor cursor = current.newCursor();
sb.append('\"').append( node.getNodeName() ).append('\"').append(':').
append('\"').append( cursor.getTextValue() ).append('\"');
if( (i+1) < children.length )
sb.append(',');
}
sb.append('}');
return sb.toString();
}
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: b
Oracle Service Bus 11g: Design and Integrate Services 6 - 28
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
REST-ful web services are based on the SOAP protocol.
a. True
b. False
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 6 - 29


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to:
Describe SOA-DIRECT transport
Describe JCA transport
Describe Representational State Transfer (REST)
Configure a proxy service to use REST
Test a proxy service by using REST
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The first three topics are demonstrations using viewlets.


Oracle Service Bus 11g: Design and Integrate Services 6 - 30
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Practice 6 Overview:
Transports in Oracle Service Bus
This practice covers the following topics:
Demonstrating virtualizing services with the use of JCA DB
Adapter and mediating access to data in the database
along with protocol bridging
Demonstrating OSB-to-SOA Suite direct binding
Demonstrating SOA Suite-to-OSB direct binding
Using REST in a proxy service
Configuring a proxy service to use REST
Testing a proxy service by using REST
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Debugging with Oracle Service Bus
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 7 - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to:
Describe and configure error handling in Oracle Service
Bus
Configure validation in Oracle Service Bus
Explain the use of the reporting action
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus (OSB) provides a mechanism to handle errors by enabling you to define
error handlers.
An error handler is a pipeline that allows you to perform various actions such as logging,
transformation, and publishing to handle errors appropriately. If an error occurs in a stage,
pipeline, or service, a sequence of steps is executed. This sequence of steps constitutes an
error pipeline for that stage.
The graphic in the slide depicts a proxy service with a message flow and an error pipeline.
The message flow consists of a request pipeline and a response pipeline. Both pipelines are
multistage. The error pipeline is separate from the message flow and is also multistage. A
route node is shown passing messages from the proxy service to the business service.
Oracle Service Bus 11g: Design and Integrate Services 7 - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Error Handler Pipelines
Proxy Service
Response Pipeline
Stage 1
Stage n
Message Flow
Action 1
Action n
Error Pipeline
Stage 1
Action 1
Action n
Stage n
Request Pipeline
Stage 1
Action 1
Action n
Stage n
Route Node
Endpoint
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The error handler at the stage level is invoked for handling an error. If the stage-level error
handler is not able to handle a given type of error, the pipeline error handler is invoked. If the
pipeline-level error handler also fails to handle the error, the service-level error handler is
invoked. If the service-level error handler also fails, the error is handled by the system.
The scope of the error handlers at various levels in the message flow is summarized as
follows:
Stage: Handles all the errors in a stage
Pipeline: Handles all the errors in a pipeline, along with any unhandled errors from any
stage in a pipeline
Service: Handles all the errors in a proxy service, along with any unhandled errors in
any pipeline in a service
Note: All WS-Security errors are handled at this level.
System: Handles all the errors that are not handled anywhere else in a pipeline
There are exceptions to the scope of error handlers. For example, an exception thrown by a
non-XML transformation at the stage level is caught only by the service-level error handler.
Suppose a transformation occurs that transforms XML to MFL for an outgoing proxy service
response message; it always occurs in the binding layer. Therefore, if a non-XML output is
missing a mandatory field at the stage level, only a service-level error handler can catch this
error.
Oracle Service Bus 11g: Design and Integrate Services 7 - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Error Handlers
An error handler is a special stage where a set of actions
can occur if something goes wrong.
The following error handlers are defined:
Stage
Pipeline
Service
System
All configuration for an error
handler is in one or more
stages contained by the
error handler.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The $fault variable contains the following attributes:


errorCode: Specifies the error code as a string value
reason: Contains a text description of the error
details: Contains the user-defined XML content related to the error
location: Identifies the node, pipeline, and stage in which the error occurred; also
identifies whether the error occurred in an error handler. The subelements include:
- node: The name of the pipeline, branch, or route node where an error occurred; a
string
- pipeline: The name of the pipeline where an error occurred (if applicable); a
string
- stage: The name of the stage where an error occurred (if applicable); a string
- error-handler: Indicates whether an error occurred in an error handler; a
Boolean
Oracle Service Bus 11g: Design and Integrate Services 7 - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
$fault Variable
$fault is a predefined context variable used to hold
information about any error that occurs during message
processing.
It is populated before the appropriate error handler is
invoked.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The table in the slide shows the error code ranges of the errorCode attribute. The contents
of the fault variable are modeled after the Simple Object Access Protocol faults to facilitate
fault generation when replying from a SOAP-based proxy service. The values for the error
codes generated by OSB correspond to the system error codes and are prefixed with a BEA
string.
The error codes associated with the errors surface inside the element of the fault context
variable. You can access the value using the following XQuery statement:
$fault/ctx:errorCode/text()
For detailed information about error codes, refer to the following documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15867/app_error_codes.htm#BAB
BGIIE
Oracle Service Bus 11g: Design and Integrate Services 7 - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Error Codes
Error Code Range Description
BEA 380000BEA 380999 Indicates a transport error (for example,
failure to dispatch a message)
BEA 382000BEA 382499 Indicates a proxy service runtime error
(for example, a stage exception)
BEA 382500BEA 382999 Indicates controls tightly integrated with
the Page Flow controller
BEA 386000BEA 386999 Indicates a WS-Security error (for
example, authorization failure)
BEA 394500BEA 394999 Indicates an error in the UDDI
subsystem
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

OSB defines three generic error codes for the three classes of possible errors. The format of
the generic codes is BEA-xxx000, where xxx represents the following generic categories:
380 Transport
382 Proxy
386 Security
394 UDDI
OSB defines unique codes for specific errors. Here are some examples:
BEA-382030: Indicates a message parse error (for example, a SOAP proxy service
received a non-SOAP message)
BEA-382500: Reserved for the case in which a Service Callout action receives a SOAP
Fault response
Oracle Service Bus 11g: Design and Integrate Services 7 - 7
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

An error-handling pipeline is invoked if a service invoked by a proxy service returns a SOAP


fault or transport error. Any received SOAP fault is stored in $body, so if a Reply with
Failure is executed without modifying $body, the original SOAP fault is returned to the client
that invoked the service. If a Reply action is not configured, the system error handler
generates a new SOAP fault message. The proxy service recognizes that a SOAP fault is
returned because an HTTP error status is set, or the JMS property SERVER_Error is set to
true.
This table shows the error returned for each transport.
Oracle Service Bus 11g: Design and Integrate Services 7 - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Reply Action
Use the Reply action from an error handler to indicate that
there is an error.
The type of error returned depends on the transport used.
Transport Error Returned
HTTP HTTP 500
JMS Sets the JMS_BEA_Error property to true
SOAP SOAP fault
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

There may be a scenario in which you receive a message from an HTTP request and the
back-end service is constructed as a one-way JMS business service. In this case, you may
want to respond with a Success after the message is sent (placed on the outbound transport)
to the one-way JMS business service.
The graphic in the slide shows a Reply action configured for Reply with Failure.
Oracle Service Bus 11g: Design and Integrate Services 7 - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Reply Action in OSB Console
The Reply action has only two options:
Reply with Success
Reply with Failure
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

When a transport error is received from an external service, and there is no error response
payload returned to OSB by the transport provider (for example, in the case that an HTTP 403
error code is returned), the Service Callout action throws an exception, which in turn causes
the pipeline to raise an error.
If there is a payload associated with the transport errorfor example, when an HTTP 500
error code is received from the business service and there is an XML payload in the
responsea message context fault is generated with the custom error code BEA-382502.
Oracle Service Bus 11g: Design and Integrate Services 7 - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Transport Errors with Service Callouts
When a transport error is received from an external service
and there is no error response payload returned to OSB,
the Service Callout action throws an exception.
If there is a payload associated with the transport error, a
message context fault is generated with the custom error
code BEA-382502.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

If the transport is HTTP, the ErrorResponseDetail element also contains the HTTP error
code returned with the response.
Oracle Service Bus 11g: Design and Integrate Services 7 - 11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Error Code BEA-382502
The following conditions must be met for a BEA-382502
error response code:
(HTTP) The response code must not be 200 or 202.
(JMS) The response must have a property set to indicate
that it is an error response.
The content type must be text/xml.
If the service is AnySoap or a WSDL-based SOAP, it must
have a SOAP envelope.
If the service type is AnyXML, or a messaging service of type
text, OSB returns XML content with a no successful
response code (any code other than 200 or 202).
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

OSB sets up the $fault context variable with:


A custom error code
A description with details of the fault
To do so, the contents of the three elements under the <SOAP-ENV:Fault> element in the
SOAP fault are extracted and used to construct an OSB fault element.
Oracle Service Bus 11g: Design and Integrate Services 7 - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SOAP Faults with Service Callouts
If an external service returns a SOAP fault, OSB sets up the
$fault context variable at run time.
<soap-env:Body>
<soap-env:Fault>
<faultcode
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">soap:Server
</faultcode>
<faultstring>Some literal string</faultstring>
<detail>
<test:theFault>
<test:ID>Any user defined code</test:Id>
<test:message>A specific literal message</test:message>
</test:theFault>
</detail>
</soap-env:Fault>
</soap-env:Body>
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The service invoked by the OSB Service Callout action returns a payload that is not
consistent with the declared service binding type and, as a result, cannot be properly parsed
by OSB.
For example, this can happen if a service that was registered with an XML binding type
returns a non-well-formed XML payload. The content of the received response can be seen in
the details element of the $fault message context variable.
Oracle Service Bus 11g: Design and Integrate Services 7 - 13
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Unexpected Responses and Service Callouts
When a service returns a response message that is not
what the proxy service run time expects, a message
context fault is generated and initialized with the custom
error code BEA-382501.
The details of the fault include the contents of the SOAP-
Body element of the response.
If the transport is HTTP, the ReceivedFault element
also contains the HTTP error code returned with the fault
response.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Resume action has no parameters and can only be used in error pipelines.
The graphic in the slide displays a sample Resume action.
Oracle Service Bus 11g: Design and Integrate Services 7 - 14
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Resume Action
In a message flow, use the Resume action to resume message
flow after an error is handled by an error handler.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a
Explanation: The Reply action has the following options:
Reply with Success
Reply with Failure
Oracle Service Bus 11g: Design and Integrate Services 7 - 15
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
The Reply action has only two options.
a. True
b. False
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: b
Explanation: The reason attribute contains a text description of the error.
Oracle Service Bus 11g: Design and Integrate Services 7 - 16
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Which of the following $fault attributes contains a text
description of the error?
a. errorCode
b. reason
c. details
d. location
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The graphic in the slide shows a proxy service with a request pipeline that has a Validate
stage. The Validate stage has a stage error handler. The pipeline is followed by a route node.
Oracle Service Bus 11g: Design and Integrate Services 7 - 17
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Validation and Error Scenario
Q: Why do you need to validate an incoming message?
A: The client application may or may not format the incoming
message.
Q: How can OSB make sure that the message being passed
in an enterprise environment is valid?
A: By using a validate action to validate elements
How to handle an error scenario:
Configure a stage error handler
to specify what should happen
if an error occurs in a specific
location in the message flow.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

XPath: An XPath expression that specifies the elements to be validated. To create or


edit the XPath expression, click <XPath> (or the XPath_fragment, if one is already
defined) to display the XPath Expression Editor.
In Variable: The name of the variable to hold the element to be validated. Enter the
name of the variable.
Against Resource: An XML schema element or a WSDL resource against which the
elements selected by the XPath expression (in the XPath field described earlier) are
validated
Save Variable or Raise Error:
- To save the result of validation (a Boolean result), select Save result of validation
in variable and enter the name of the variable in which you want to save the
result.
- Alternatively, to raise an error if the element fails validation against the WSDL or
XML schema element, select Raise Error on validation failure.
The graphic in the slide shows a sample Validate action.
Oracle Service Bus 11g: Design and Integrate Services 7 - 18
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Validate Action
It validates elements selected by an XPath expression
against an XML schema element or a WSDL resource.
The Validate action enables you to validate only Global
elements.
OSB does not support validation against local elements.
XPath In Variable Against Resource
Raise Error
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a
Explanation: An XPath expression specifies the elements to be validated against an XML
schema element or a WSDL resource.
Oracle Service Bus 11g: Design and Integrate Services 7 - 19
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
The Validate action validates elements selected by an
________ expression.
a. XPath
b. XQuery
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Reporting actions that you can add to a stage in a message flow are:
Report: A report action enables message reporting for a proxy service.
Log: A log action constructs a message to be logged.
Alert: An alert action sends an alert notification based on pipeline message context.
Oracle Service Bus 11g: Design and Integrate Services 7 - 20
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Reporting Actions
The Reporting Actions category has actions to log or report
errors and generate alerts if required in a message flow in
a stage.
There are three types of actions:
Report
Log
Alert
Reporting
Actions
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You do not need to configure a report action for alert reporting. Alert data is always available
in the reporting data stream. For more information, refer to the following:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15867/reporting.htm#i1049217.
Information you need for creating your own reporting provider is located in
com.bea.wli.reporting at the following link:
http://docs.oracle.com/cd/E17904_01/apirefs.1111/e15033/toc.htm
Oracle Fusion Middleware Java API Reference for Oracle Service Bus 11g Release 1
(11.1.1.4) provides information about what you need to do to implement a reporting provider,
including how to package it, where it goes, how to deploy it, and the order of deployment. The
reporting schema is MessageReporting.xsd, which is located in OSB_HOME/lib/sb-
schemas.jar.
Oracle Service Bus 11g: Design and Integrate Services 7 - 21
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Oracle Service Bus Reporting Framework
OSB contains an extensible framework for creating one or
more reporting providers for messages or alerts.
To enable message reporting, first create a Report action.
The Report action allows you to extract information from
each message and write it to the OSB Reporting Data
Stream.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

As the graphic in the slide shows, both report messages and alerts are exported to reporting
data streams. In the Report stage, information is extracted by the Report action from each
message and written to the Reporting Data Stream with metadata that adheres to
MessageReporting.xsd.
Similarly, the SLA Manager uses Reporting Data Manager APIs to write to the Alert Reporting
Stream with metadata that adheres to the AlertReporting.xsd. To develop a reporting
provider for alerts or your own message reporting provider, you need to implement the
ReportingDataHandler interface and use the ReportingDataManager class.
SPI is an acronym for Service Provider Interface.
The graphic in the slide shows the framework consisting of three layers: the SLA Manager,
ReportingDataManager, and the data handlers.
Oracle Service Bus 11g: Design and Integrate Services 7 - 22
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Reporting Framework:
Diagrammatic Representation
Oracle Service Bus
Reporting Stage SLA
Manager
ReportingDataManager
XReportingDataHandler
(Provider 2)
JMSReportingDataHandler
(Provider 1)
YReportingDataHandler
(Provider 3)
API
SPI
ReportingDataHandler
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The ReportingDataHandler interface takes the reporting or alert data stream and
processes it. It can either process or store a stream, or do both in a relational database, file,
JMS queue, and so on. Depending on which stream you want to use, you need to implement
the appropriate handle methods to process the data stream:
Message Reporting Stream: The Report action of Oracle Service Bus run time uses
the following two handle methods to write to the Message Reporting Stream:
- handle(com.bea.xml.XmlObject metadata, String s)
- handle(com.bea.xml.XmlObject metadata, com.bea.xml.XmlObject data)
Alert Reporting Stream: The Alert Manager uses the following handle method to write
to the Alert Reporting Stream:
- handle(com.bea.xml.XmlObject metadata, String data)
The ReportingDataManager is a local server object that keeps a registry of reporting
providers. Reporting providers implement the ReportingDataHandler interface. The
ReportingDataManager provides operations to:
Add and remove reporting data handlers
Export reporting data stream using various handle operations
Oracle Service Bus 11g: Design and Integrate Services 7 - 23
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To receive report messages from either the JMS Reporting Provider, which is provided with
the OSB installation, or your reporting provider, you must first create a Report action in the
message flow for the proxy service. In the Report action, you must specify the information that
you want to extract from the message and add to the OSB reporting data stream.
However, you need not configure a Report action for alert reporting. Alert data is always
available in the reporting data stream.
When you configure a Report action, use key values to extract key identifiers from the
message. You can configure multiple keys. You can capture information not only from the
body of the message but also from any other variable associated with the message, such as
header or inbound variables.
Expression: The XQuery expression used to create the data that will be reported
The graphic in the slide shows a sample Report action.
Oracle Service Bus 11g: Design and Integrate Services 7 - 24
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Report Action
The Report action enables you to extract information from each
message and write it to the OSB reporting data stream.
Expression
Key Name
XPath
In Variable
Key Icon
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Search keys: When you finish editing the XQuery expression, click Add a Key to add
a key/value pair to be used to extract key identifiers from any message context variable
or message payload. (The rest of the message is ignored.) Keys are a convenient way
to identify a message.
1. In the Key Name field, enter a name for the key.
2. In the Key Value column, click <XPath> to create the XPath expression in the
XPath Expression Editor.
3. In the In Variable field, enter the name of the variable on which the expression will
be executed.
4. Click the Key icon to add additional keys.
The graphic in the slide shows a sample Report action.
Oracle Service Bus 11g: Design and Integrate Services 7 - 25
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Expression: The message context to be logged through XQuery expressions on


context variables
Annotation: Notes for this Log action. These notes are logged along with the result of
the previously defined expression.
Severity: The severity of the log message. Options are:
- Debug: While your application is under development, you may find it useful to
create and use messages that provide verbose descriptions of low-level activity
in the application.
- Info: This is used for reporting normal operations. It is a low-level informational
message.
- Warning: A suspicious operation or configuration has occurred but it may not
affect normal operation.
- Error: A user error has occurred. The system or application can handle the error
with no interruption and limited degradation of service.
The graphic in the slide shows a sample Log action.
Oracle Service Bus 11g: Design and Integrate Services 7 - 26
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Log Action
In a message flow, use the Log action to construct a message
to be logged and to define a set of attributes with which it will
be logged.
Expression
Annotation
Severity
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Unlike SLA alerts, notifications generated by the Alert action are for business use or reporting
errors, and not for monitoring system health. Configure and choose alert destinations with this
in mind.
Expression: An XQuery expression that specifies the message context to be added to
the alert message
Summary: A short description of the alert. This is the subject line in the case of an email
notification and can contain no more than 80 characters. If no description is provided, a
predefined subject line (Oracle Service Bus Alert) is used.
Severity: The severity level for this alert. Select a level from the list.
Destination: The destination for the alert. To specify a destination, click <Destination>
to select an appropriate resource.
Note: An alert destination must exist before being referenced in an alert.
The graphic in the slide shows a sample Alert action.
Oracle Service Bus 11g: Design and Integrate Services 7 - 27
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Alert Action
In a message flow, use the Alert action to generate alerts
based on the message context in a pipeline to send to an
alert destination.
Expression
Summary
Severity
Destination
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a, c, d
Explanation: The reporting actions that you can add to a stage in a message flow are:
Report: A report action enables message reporting for a proxy service.
Log: A log action constructs a message to be logged.
Alert: An alert action ends an alert notification based on the pipeline message context.
Oracle Service Bus 11g: Design and Integrate Services 7 - 28
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Which of the following reporting actions can you add to a stage
in a message flow? (Choose all that apply.)
a. Log
b. XQuery
c. Report
d. Alert
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Although debugging should be disabled during normal OSB operation, you may find it helpful
to turn on certain debug flags while you are developing your solution and experimenting with it
for the first time. For example, you may want to turn on the alert debugging flag when you
develop alerts and would like to investigate how the alert engine works.
Oracle Service Bus 11g: Design and Integrate Services 7 - 29
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Debug Files
You can enable and disable debugging by modifying the
corresponding entries in the following debug XML files,
which are located in the root directory of your OSB
domain:
alsbdebug.xml: Contains the OSB-related debug flags
configfwkdebug.xml: Contains the configuration-related
debug flags
If these files do not exist, empty files are created when the
server starts.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

This table describes seven of the OSB debug flags. You can use these flags in the
lsbdebug.xml file.
Oracle Service Bus 11g: Design and Integrate Services 7 - 30
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Debug Flags
Flag Description
alsb-stages-transform-
runtime-debug
Provides information about transformation-
related actions
alsb-alert-manager-debug Prints an evaluation of alerts
alsb-jms-reporting-
provider-debug
Provides information about the out-of-the-box,
JMS-based reporting provider
alsb-management-debug Provides information about user and group
management in the console
alsb-monitoring-debug Provides information about the statistics
system
alsb-pipeline-debug
Provides information about errors that are
generated in the pipeline
alsb-service-repository-
debug
Provides information about the various
service-related configuration operations
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

This table describes seven more OSB debug flags.


Oracle Service Bus 11g: Design and Integrate Services 7 - 31
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
OSB Debug Flags
Flag Description
alsb-service-security-
manager-debug
Provides information about access control
alsb-transports-debug
Provides transport-related debug information
(including transport headers) that is printed
per message
alsb-wsdl-repository-debug
Provides information about the WSDL-related
configuration operation
alsb-wspolicy-repository-
debug
Provides information about the WS policy
alsb-custom-resource-debug Provides information about the custom
resources
alsb-mqconnection-debug
Provides information about the MQ connection
resource
alsb-throttling-debug Provides information about the throttling
feature
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The table describes the Configuration Framework debug flags.


Oracle Service Bus 11g: Design and Integrate Services 7 - 32
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Configuration Framework Debug Flags
Flag Description
config-fwk-debug Provides information about the general
aspects of the OSB configuration
config-fwk-transaction-
debug
Provides low-level debug information about
the changes made to in-memory data
structures and files; also generates server
startup recovery logs
config-fwk-deployment-debug Provides debug information about session
creation, activation, and distribution of
configuration in a cluster
config-fwk-component-debug Provides low-level debug information about
create, update, delete, and import operations
config-fwk-security-debug Provides debug information about encryption
and decryption during importing and exporting
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 7 - 33


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to:
Describe and configure error handling in Oracle Service
Bus
Configure validation in Oracle Service Bus
Explain the use of the reporting action
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 7 - 34


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Practice 7 Overview:
Debugging with Oracle Service Bus
This practice covers the following topics:
Error handling and validation
Using the reporting action
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Introduction to Oracle Service Bus Security
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 8 - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to describe:
Oracle Service Bus security
Oracle Web Services Manager integration with Oracle
Service Bus
Web Services Policy (WS-Policy)
Security Assertion Markup Language (SAML) for
authentication
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus supports open industry standards for ensuring the integrity and privacy of
communications, and ensures that only authorized users can access resources in an Oracle
Service Bus domain. It uses the underlying WebLogic security framework, in which the work
of securing a domain is divided into several components (providers). You configure only those
providers that you need for a given Oracle Service Bus domain.
Oracle Service Bus 11g: Design and Integrate Services 8 - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Introduction to Oracle Service Bus Security
Oracle Service Bus uses the underlying WebLogic security
framework as building blocks for its security services.
The WebLogic security framework divides the work of
securing a domain into several components (providers):
Authentication
Authorization
Credential mapping
Auditing
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Inbound security can also ensure that no unauthorized user has viewed or modified the data
as it was sent from the client. Proxy services can have two types of clients: service
consumers and other proxy services.
You set up inbound security when you create proxy services, and you can modify it as your
needs change. For each proxy service, you can configure the following inbound security
checks:
Transport-level security: Applies security checks as part of establishing a connection
between a client and a proxy service. The security requirements that you can impose
through transport-level security depend on the protocol that you configure the proxy
service to use.
Custom Authentication for message-level security: Oracle Service Bus supports
client-specified custom authentication credentials for inbound transport- and message-
level requests. The custom authentication credentials can be in the form of a custom
token, or a username and password.
Message-level security (for proxy services that are web services): Part of the WS-
Security specification. It applies security checks before processing a SOAP message or
specific parts of a SOAP message.
Oracle Service Bus 11g: Design and Integrate Services 8 - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Inbound and Outbound Security
Inbound security ensures that Oracle Service Bus proxy
services handle only the requests that come from
authorized clients.
Outbound security secures communication between a
proxy service and a business service.
Service
Consumer Client
Proxy Service
Proxy Service
Business Service
Business Service
Inbound Outbound
Communication between
proxy services and their
clients is secured by
inbound security.
Communication between proxy
services and business services is
secured by outbound security.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Most of the tasks that you complete for outbound security are for configuring proxy services to
comply with the transport-level or message-level security requirements that business services
specify.
For example, if a business service requires username and password tokens, you create a
service account, which either directly contains the username and password, passes along the
username and password that was contained in the inbound request, or provides a username
and password that depend on the username that was contained in the inbound request.
For more information about inbound and outbound security, refer to the following
documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/model.htm#insertedID1
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/model.htm#insertedID2
Oracle Service Bus 11g: Design and Integrate Services 8 - 5
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Decisions with respect to the following points affect how Oracle Service Bus propagates client
identities to business services:
Which type of credentials do you require clients to provide?
Do you require Oracle Service Bus to authenticate clients or to simply pass the client-
supplied credentials to business services for authentication?
If Oracle Service Bus authenticates clients that provide X.509 tokens or SAML tokens,
which Oracle Service Bus user maps to the tokens?
If Oracle Service Bus authenticates clients that provide custom authentication tokens,
which Oracle Service Bus user maps to the tokens?
If Oracle Service Bus authenticates clients that provide username and password tokens,
decide whether you want to:
- Pass the clients username and password to the business service
- Map the clients username to a new username and password and pass the new
credentials to the business service
For more information about identity propagation options, refer to the following documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/model.htm#insertedID3
Oracle Service Bus 11g: Design and Integrate Services 8 - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Identity Propagation in Oracle Service Bus
A key decision that you must make when designing
security for Oracle Service Bus is how to handle
(propagate) the identities that clients provide.
You can configure Oracle Service Bus to do any of the
following:
Authenticate the credentials that clients provide.
Perform authorization checks.
Pass client credentials to business services unchanged.
Map client credentials to a different set of credentials that a
business service can authenticate and authorize.
Bridge between security technologies.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A client sends a request to a proxy service. The request contains the username and
password credentials.
Clients can send other types of tokens for authentication, such as an X.509 certificate or
a custom authentication token. If a client sends an X.509 certificate token or a custom
token, you must configure an identity assertion provider to map the identity in the token
to an Oracle Service Bus security context.
The proxy service asks the domains authentication provider if the user exists in the
domains authentication provider store.
If the user exists, the proxy service asks the domains authorization provider to evaluate
the access control policy that you have configured for the proxy service.
If the proxy services access control policy allows the user access, the proxy service
processes the message. As part of generating its outbound request to a business
service, the proxy service asks the business service to supply the username and
password that the business service requires.
Oracle Service Bus 11g: Design and Integrate Services 8 - 7
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Example: Authentication with a Username Token
Client
Proxy Service
Business
Service
Authentication
Provider
Service
Account
Authorization
Provider
Inbound Request:
Username = pat
Outbound Request:
Is pat a known user?
Is pat allowed access?
Get credentials for
outbound request.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The business service asks its service account for the credentials. Depending on how the
service account is configured, it does one of the following:
- Requires the proxy service to encode a specific (static) username and password
- Requires the proxy service to pass along the username and password that the
client supplied
- Maps the username that was returned from the authentication provider to some
other (remote) username, and then requires the proxy service to encode the
remote username
The proxy service sends its outbound request with the username and password that
were returned from the service account.
Oracle Service Bus 11g: Design and Integrate Services 8 - 8
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Web Services Manager (OWSM) is a component of Oracle Enterprise Manager Fusion
Middleware Control, a runtime framework that provides centralized management and
governance of Oracle SOA Suite environments and applications. You create and configure
OWSM policies in Oracle Enterprise Manager, and those policies are persisted in a policy
store (a database is recommended). OWSM lets you define policies against an LDAP
directory and generate standard security tokens (such as SAML tokens) to propagate
identities across multiple web services used in a single transaction.
In Oracle Service Bus, when defining a business or proxy service that lets you attach security
policies, you can attach available OWSM policies. Because OWSM is a runtime component,
attaching policies to Oracle Service Bus services requires a connection to an Oracle Service
Bus domain that has OWSM enabled.
OWSM support in Oracle Service Bus is not available automatically. Enable OWSM support
in Oracle Service Bus by selecting the Oracle Service Bus OWSM Extension template when
you create or extend an Oracle Service Bus domain.
Oracle Service Bus 11g: Design and Integrate Services 8 - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Securing Oracle Service Bus
with Oracle Web Services Manager
Oracle Web Services Manager is a runtime framework for
security policy creation, management, and governance.
You create policies, attach them to services in Oracle
Service Bus, and enforce those policies at various points in
the messaging life cycle with Oracle Web Service Manager
agents.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

When you create policies by using Oracle Enterprise Manager, you can attach those policies
to the following types of proxy and business services in Oracle Service Bus on the Policies
page:
WSDL
Any SOAP
You can attach OWSM policies only at the service level, and you cannot embed them in
service WSDLs. For a given service, you must use either OWSM policies or WLS 9.2 policies,
but not both. You can, however, use one type of policy in a proxy service and another type in
a corresponding business service.
In Eclipse, when adding OWSM policies to services, you must be connected to a running
domain that has OWSM enabled. If you are not connected to a running server in the
development environment, you can only view and remove previously added OWSM policies,
and Oracle Service Bus shows a warning that the OWSM policies will be validated only on
publish.
After adding OWSM policies to a service, you can provide policy overrides on the Security
page.
For the policies used, the user interface displays the override keys (properties) and their
default values. The key names come from the policy binding. If an override value is allowed, a
text box appears next to a keys default value where you can provide an override value.
Oracle Service Bus does not provide well-known keys for override, such as sign key alias or
CSF key, which points to user credentials in a CSF (Credential Store Factory) store. (Oracle
Service Bus provides user credentials in the service account.)
Override keys that you provide are passed to the OWSM agent during invocation.
Oracle Service Bus 11g: Design and Integrate Services 8 - 10
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

1. In the navigator pane, expand the WebLogic Domain folder to show the domain for
which you want to see the policies. Right-click the WebLogic domain (for example, the
soa_domain, as shown in the slide). From the shortcut menu, select Security and then
select Security Provider Configuration.
2. On the Security Provider Configuration page, expand Keystore and click Configure.
3. On the Keystore Configuration page, specify the path and name, as well as the
password for the keystore that you created. Also specify an alias and password for the
signature and encryption keys.
Note: The OWSM run time does not use the WebLogic Server keystore that is used for SSL.
The details entered on the Keystore Configuration page ensure the autogeneration of the CSF
key. The CSF key stores the keystore password securely.
Oracle Service Bus 11g: Design and Integrate Services 8 - 11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Configuring OWSM Keystore
by Using Enterprise Manager Console
1
2
3
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The Credential Store Framework (CSF) API is used by applications to access the credentials
stored in a credential store.
The CSF is part of the Java Platform Security (JPS) framework. The CSF is configured in
jps-config.xml as one of the various JPS services. The CSF can be configured
in jps-config.xml either as a file-based Oracle wallet or as an LDAP provider.
Oracle Service Bus 11g: Design and Integrate Services 8 - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Credential Store Framework
The Credential Store Framework:
Enables you to manage credentials securely
Provides an API for storage, retrieval, and maintenance of
credentials in different back-end repositories
Supports file-based (Oracle wallet) and LDAP-based
credential management
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

1. In the navigator pane, expand WebLogic Domain to show the domain for which you
need to configure the keystore. Right-click the domain, click Security, and then click
Credentials.
2. Click Create Map and enter the map name oracle.wsm.security.
3. Click Create Key and select the map name oracle.wsm.security if it is not already
selected. Enter the key name and select the key type (either Password or Generic). A
password credential can store a username and password; a generic credential can store
any credential object. For a password credential, enter the username and password.
Click OK.
Oracle Service Bus 11g: Design and Integrate Services 8 - 13
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Configuring the OWSM CSF
by Using Oracle Enterprise Manager
1
2
3
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In Oracle Service Bus, WS-Policy assertions are used to specify a web services requirements
for digital signatures and encryption, along with the security algorithms and authentication
mechanisms that it requires.
The WS-Policy framework allows other specifications to declare policy assertions. These are
domain-specific XML elements that appear inside a <policy> element. Policy assertion
specifications describe the syntax and semantics of these domain-specific assertions.
WS-SecurityPolicy is one example of a domain-specific assertion language. The WS-
SecurityPolicy specification defines a set of security policy assertions for use with the WS-
Policy framework.
WS-ReliableMessaging is another example of a domain-specific assertion language; it
defines assertions for declaring reliable-messaging policy.
Oracle Service Bus 11g: Design and Integrate Services 8 - 14
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Web Services Policy
Web Services Policy (WS-Policy) is a standards-based
framework for defining a web services constraints and
requirements.
It expresses constraints and requirements in a collection of
XML statements called policies, each of which contains
one or more assertions.
The WS-Policy framework is used to express the
message-level security requirements for a proxy service or
business service (that is, a web service).
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Technique 1: If your clients do not provide SAML tokens but your business services require
them, you can configure a proxy service to map the clients identity to a SAML token. This
technique requires the business service to be a web service with WS-Policy statements that
require authentication using SAML tokens. For more information, refer to the following
documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/saml.htm#insertedID1
Technique 2: If your clients provide SAML tokens to a pass-through proxy service, you can
propagate the clients SAML token to the business service. For details, refer to the following
documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/saml.htm#insertedID2
Technique 3: If your clients provide SAML tokens to an active intermediary proxy service,
you can configure the proxy service to assert the clients identity. For details, refer to the
following documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/saml.htm#insertedID3
Oracle Service Bus 11g: Design and Integrate Services 8 - 15
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Using Security Assertion Markup Language
(SAML) for Authentication
Security Assertion Markup Language (SAML) defines a
framework for exchanging authentication and authorization
information between online business partners.
Oracle Service Bus enables the following techniques for
using SAML:
1: Clients do not
provide SAML tokens
but your business
services require
them.
Configure a proxy
service to map the
clients identity to a
SAML token.
2: Clients provide
SAML tokens to a
pass-through proxy
service.
Propagate the
clients SAML token
to the business
service.
3: Clients provide
SAML tokens to an
active intermediary
proxy service.
Configure the proxy
service to assert the
clients identity.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a
Explanation: Inbound security can also ensure that no unauthorized user has viewed or
modified the data as it was sent from the client. Proxy services can have two types of clients:
service consumers and other proxy services.
Oracle Service Bus 11g: Design and Integrate Services 8 - 16
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
Which type of security ensures that Oracle Service Bus proxy
services handle only the requests that come from authorized
clients?
a. Inbound
b. Outbound
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Answer: a
Explanation: The Web Services Policy (WS-Policy) framework is used to express the
message-level security requirements for a proxy service or business service (that is, a web
service).
Oracle Service Bus 11g: Design and Integrate Services 8 - 17
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quiz
In Oracle Service Bus, WS-Policy assertions are used to
specify a web services requirements for digital signatures and
encryption, along with the security algorithms and
authentication mechanisms that the web service requires.
a. True
b. False
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 8 - 18


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to describe:
Oracle Service Bus security
Oracle Web Services Manager integration with Oracle
Service Bus
Web Services Policy (WS-Policy)
Security Assertion Markup Language (SAML) for
authentication
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services 8 - 19


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Practice 8 Overview:
Introduction to Oracle Service Bus Security
This practice covers the following topics:
Setting up Oracle Web Services Manager (OWSM) and
creating the required user
Propagating identity from Oracle Service Bus to a
composite application by specifying a SAML OWSM policy
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Service Bus Concepts
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services A - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to:
Define a service bus
Identify the key benefits of a service bus
Describe the fundamental technologies on which a service
bus is built
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

A service bus facilitates enterprise-wide reuse of services and centralizes management of the
services. It is valuable to the implementation of a Service-Oriented Architecture (SOA)
because it:
Routes and transforms messages
Executes transactions
Orchestrates services
Supports heterogeneous standards and message formats
Oracle Service Bus 11g: Design and Integrate Services A - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Introduction to Service Bus Technology
A service bus is a middleware architecture that provides
fundamental services for more complex architectures.
Service Bus
Service
Producer
Service
Producer
Service
Producer
Service
Consumer
Service
Consumer
Service
Consumer
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The key benefits of a service bus are that it does the following:
Supports multiple protocol messaging
Isolates service location changes
Uses business rules to determine destination service
Transforms messages to match the format of a service
Combines existing services to make new services.
Enables message enrichment
Ensures security at all levels
Orchestrates services
Oracle Service Bus 11g: Design and Integrate Services A - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Benefits of a Service Bus
The key benefits of a service bus are:
Location transparency
Dynamic routing
Transformations
Message brokering
Service orchestration
Message enrichment
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The service bus is built on two key technologies:


Web services: Supports interoperable machine-to-machine interaction over a network
XML technologies: XML Schema, XPath, XQuery, and Extensible Stylesheet Language
Transformations (XSLT)
Each of these technologies is discussed in the following slides.
Oracle Service Bus 11g: Design and Integrate Services A - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Service Bus Technologies
The fundamental technologies on which a service bus is built
are:
Web Services
Web Services Description Language (WSDL)
Simple Object Access Protocol (SOAP)
Universal Description, Discovery, and Integration (UDDI)
XML Technologies
XML Schema
XPath
XQuery
Extensible Stylesheet Language Transformations (XSLT)
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

WSDL provides a standard way to describe web services. It uses the XML format for
describing a web service and the functionality that the web service has to offer.
A WSDL document contains the service interface definition, the implementation details, the
access protocol, and the contact endpoints information about an operation. The WSDL
document describes a web service by using these major elements:
<types>: Defines the data types used by the web service
<portType>: Describes a web service, the operations that can be performed, and the
messages that are involved
<message>: Describes the messages used by the web service and the data elements
of an operation
<binding>: Defines the communication protocols used by the web service
<service>: Describes the name and location of the web service and the context with
which it can be accessed
Oracle Service Bus 11g: Design and Integrate Services A - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Web Services Description Language
A WSDL document is an XML
document that describes:
What the service does
How the service is accessed
Where the service is located
It defines the messages and
operations of a service
abstractly in XML.
WSDL
Types
Messages
Port types
Bindings
Services
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Simple Object Access Protocol is a remote function protocol based on XML that is used to
invoke web services. It wraps messages in an envelope protocol and supports headers and
attachments. It depends on other Application layer protocols, such as remote procedure call
(RPC) and Hypertext Transfer Protocol (HTTP) for message transmission.
Oracle Service Bus 11g: Design and Integrate Services A - 7
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Communication Envelope
SOAP Envelope
Simple Object Access Protocol
Simple Object Access Protocol (SOAP) can be defined as a
protocol specification for exchanging structured information in
the implementation of web services in computer networks.
SOAP Header
SOAP Body
SOAP Attachments
SOAP Structure
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

UDDI is a platform-independent, XML-based registry to classify and catalog services. It uses


the SOAP interface to provide access to WSDL documents describing the protocol bindings
and message formats that are needed for interaction with the web services listed in its
directory.
Oracle Service Bus 11g: Design and Integrate Services A - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Universal Description, Discovery,
and Integration (UDDI)
Universal Description, Discovery, and Integration:
Is a metadata structure to classify and catalog services
Uses a SOAP interface to communicate with a service
registry
Service Development
and Management
Tools
Service Registry
WSDL + metadata
WSDL + metadata
Publish Service
Discover Service
SOAP
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

An XML schema defines:


Elements and attributes that can appear in a document
Order and number of child elements
Whether an element is empty or can include text
Data types for elements and attributes
Default and fixed values for elements and attributes
Oracle Service Bus 11g: Design and Integrate Services A - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
XML Schema
The XML schema is an XML document that defines the
structure of other XML documents.
It enables faster message validation and processing.
It has an unique ID called a namespace.
<xs:schema
targetNamespace="http://schemas.bea.com/purchase"
xmlns="http://schemas.bea.com/purchase"
xmlns:po="http://schemas.bea.com/purchase"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="PurchaseOrder">
<xs:complexType>
...
</schema>
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

XPath is a syntax for defining parts of an XML document. It uses path expressions to navigate
and select nodes or node sets in an XML document.
XPath contains a library of standard functions. There are functions for string values, numeric
values, date and time comparison, and so on.
Oracle Service Bus 11g: Design and Integrate Services A - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
XPath
XPath can be defined as a standard XML expression language
and is used to identify or locate portions of an XML document.
<PurchaseOrder>
<Item line=1">
<price>9.49</price>
<quantity>1</quantity>
</Item>
</PurchaseOrder>
//PurchaseOrder/Item/price
XPath expression
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

XQuery is:
The language for querying XML data
Built on XPath expressions
Supported by all major databases
XQuery is a complete structured programming language that supports constructs like
variables, statements, conditions, loops, and functions.
Oracle Service Bus 11g: Design and Integrate Services A - 11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
XQuery
XQuery is a structured language for working with XML
documents. It is used for finding and extracting elements and
attributes from XML documents.
return <items>
for $item in
//PurchaseOrder/Item
order by $item/title
return
<price>{$item/price}<pric
e>
return </items>
<items>
<price>49.99</price
>
<price>9.49</price>
</items>
XQuery
Output of an XQuery
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

XSLT involves the creation of XML documents that act as transformation templates and that
use a special scripting language. XLST is not a structured programming language. Its
templates leverage XPath expressions to identify document elements and attributes.
Oracle Service Bus 11g: Design and Integrate Services A - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Extensible Stylesheet Language Transformations
XSLT is an alternative to XQuery for XML transformations.
It is a loosely typed scripting language and does not
require XML schema.
It can transform complete and partially complete XML
documents.
<xsl:stylesheet>
<xsl:template match="//Item">
<line id="{@line}">
<xsl:value-of select="price"/>
</line>
</xsl:template>
</xsl:stylesheet>
<line id=1>
49.99
</line>
<line id=2>
9.99
</line>
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services A - 13


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to:
Describe the key benefits of a service bus
Identify the fundamental service bus technologies
Web services
XML technologies
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Transports
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services B - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to describe:
SB transport
EJB transport
JEJB transport
Local transport
WS transport
MQ transport
HTTP and poll-based transports
Oracle Data Service Integrator transport
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The SB transport supports:


Propagation of the transaction context. A transaction originated in the client Oracle
Service Bus servers can optionally be propagated to the SB proxy service.
Propagation of the security context. By default, the security context associated with the
SB client thread is used to invoke the SB proxy services.
Invocation of SB proxy services, with custom identities, by the outbound endpoint using
a service account
Association of a dispatch-policy for both request and response connections
Optimization of RMI call and call-by-reference when routing to an SB business service
without a JNDI provider
WSDL, SOAP, and XML service types
Request (one-way) and request/response for the inbound transport
Request and request/response for the outbound transport environment values
Default values for the following quality of service (QoS):
- exactly-once for nonOracle Service Bus clients
- best-effort for Oracle Service Bus clients
Oracle Service Bus 11g: Design and Integrate Services B - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
SB Transport
The SB transport allows Oracle products to synchronously
invoke an Oracle Service Bus proxy service by using RMI.
The inbound transport enables clients to access SB proxy
services by using RMI.
The outbound transport allows the invocation of SB proxy
services by using RMI.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Using the EJB transport, Oracle Service Bus supports native RMI invocation of EJB 2.1 or
EJB 3.0 stateless session beans deployed on supported platforms. It allows transactional and
secure communications. You can also leverage the EJB transport to expose an EJB as a web
service through Oracle Service Bus.
The EJB transport provides the following capabilities:
Transactional integrity
Security propagation
HTTP tunneling and encrypted communication
JNDI provider
High-performance caching
Failover and load balancing
Advanced XML-to-Java binding capabilities
Intelligent retries
For more information about the EJB transport, see the following documentation:
http://download.oracle.com/docs/cd/E17904_01/doc.1111/e15866/ejb.htm#i1076806
Oracle Service Bus 11g: Design and Integrate Services B - 4
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
EJB Transport
The EJB transport is fully integrated into the Oracle
Service Bus configuration, management, monitoring, and
test consoles.
You can use business services configured with the EJB
transport for publish, service callout, and service
invocations.
You cannot create proxy services that use the EJB
transport.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You can use an EJB to invoke a remote EJB operation or a non-EJB service, or you can
invoke an EJB operation with a non-EJB request. To a Java EE client, a JEJB proxy service
pipeline looks like a stateless session bean. A JEJB proxy service, on receiving the method
arguments, passes their XML representation in the pipeline $body variable.
POJO arguments are represented as the XML fragment. This XML fragment contains the
location of the actual POJO stored in the object repository within the pipeline. XML arguments
can be passed either by value or by reference (referencing the actual object stored in the
object repository). Primitive types are always passed by value.
The JEJB transport stores the following environment values for JEJB services:
Service URI
Work Manager
UDDI Auto Publish (proxy services)
Service Account (business services)
Oracle Service Bus 11g: Design and Integrate Services B - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
JEJB Transport
The JEJB transport lets you pass Plain Old Java Objects
(POJOs) through Oracle Service Bus.
The EJB transport, available only for business services,
invokes remote EJBs through the Java Web Services
(JWS) framework.
The JEJB transport, which lets you invoke remote EJBs
and external services with POJOs, passes POJOs directly
through Oracle Service Bus to the target EJB methods by
using an RMI serialization or deserialization cycle.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Service bus architectures include complex message flows in which messages are routed
through multiple proxy services that are organized into larger multiple proxy service flows.
Individual proxy services in these multiple proxy service scenarios route, publish, or call out to
the next proxy service in the flow.
The reason for a multiple proxy services design is to support modularity and
compartmentalization of the various components of the end-to-end message flow.
The individual proxy services in a multiple proxy service flow need to:
Communicate efficiently and securely
Allow transactions and transactional behavior to be propagated
Allow security context to be propagated so that the identity can be propagated end to
end. The security context propagation also allows the client of the first proxy service in a
multiple service flow to be authorized by the proxy services that are subsequently
invoked in the flowthus supporting fine-grained access control generic headers in the
local transport.
Using the local transport for proxy services ensures support for these capabilities.
Oracle Service Bus 11g: Design and Integrate Services B - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Local Transport
Local transport-based proxy services can be invoked only
by other proxy service and not by other clients.
The invocation is optimized by Oracle Service Bus.
Local proxy services do not have a URI.
Limitations of the local transport:
You can invoke the proxy service using the local transport
only from another proxy service.
The proxy services using the local transport cannot be
published to the UDDI.
A local transport proxy service cannot process inbound WS-
Security SAML tokens.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Key features of the WS transport:


One-way and request/response message patterns
exactly-once transfer between WS transport and other transports (JMS, SB, and
Tuxedo transports) that support XA transactions
Retaining WSRM security configuration while importing resources
Assignment of transport-level access control policy to a WS proxy service in the Oracle
Service Bus Console
WS-I Basic Profile compliance
Quality of service (QoS) in Oracle Service Bus for WS proxy service is always set as
exactly-once.
Oracle Service Bus 11g: Design and Integrate Services B - 7
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
WS Transport
The Web Services Reliable Messaging (WSRM)
specification describes a protocol that enables messages
to be delivered reliably between distributed applications.
WSRM functionality is available in Oracle Service Bus as
the WS transport.
The WS transport implements both inbound and outbound
requests for services derived from SOAP 1.1based and
SOAP 1.2based WSDLs with a WSRM policy.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The MQ transport is available for the Message Service and XML Service service types. This
transport supports both inbound and outbound connectivity.
Using the MQ transport has the following advantages over using the WebSphere MQ JMS
interface:
Faster connection to WebSphere MQ through the MQ transport than through the
WebSphere MQ JMS interface
Ability to read and generate MQ messages. Using the JMS interface, it is not possible to
set certain headers.
Support for sending and receiving MQ receipt messages
No explicit binding of MQ Connection Factory and MQ Queue to WebLogics JNDI is
required.
Configuration of resources like a JMS provider (outside of Oracle Service Bus) is not
required.
Performance improvement because messages are sent directly using the transport
instead of channeling them through the JMS transport
Oracle Service Bus 11g: Design and Integrate Services B - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
MQ Transport
Oracle Service Bus supports access to IBM WebSphere
MQ using the MQ transport.
Key features of MQ transport:
Inbound and outbound connectivity
Access to WebSphere MQ
Sending and receiving messages of any XML, Binary, XML,
Text and MFL types
Processing of all the MQMD (MQ message descriptor)
headers
TCP/IP and bindings mode for connecting to queue
managers
One-way and two-way SSL on inbound and outbound
transport
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You can use different types of transports to configure proxy services or business services in
Oracle Service Bus. The transport protocol you select depends on the service type, the type
of authentication required, the service type of the invoking service, and so on.
Email, file, FTP, and SFTP are poll-based transports. This section describes poll-based
transports and the HTTP transport.
You can select the HTTP transport protocol when you configure any type of proxy or business
service. Use the following endpoint URI formats:
Proxy services: /someService
Business services: http://host:port/someService, where someService is the name
of a proxy service or business service.
Oracle Service Bus 11g: Design and Integrate Services B - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
HTTP and Poll-Based Transports
Poll-based transports are transports with transport pollers
pinned to a managed server.
These transports use the JMS framework to ensure that
the processing of a message is done at least once.
The HTTP transport lets you send messages between
clients and service providers through Oracle Service Bus
by using the HTTP(S) protocol.
The HTTP transport also provides support for working with
REST (Representational State Transfer) environments.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

To make an Oracle Data Service Integrator data service available to an Oracle Service Bus
client:
1. Generate a WSDL file for your data service and import the new WSDL into Oracle
Service Bus using the recommended procedure.
2. Configure or create a business service based on the WSDL.
3. Configure or create a proxy service based on the business service.
4. Invoke data services through Oracle Service Bus.
Oracle Service Bus 11g: Design and Integrate Services B - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Oracle Data Service Integrator Transport
Oracle Data Service Integrator can be accessed through
an Oracle Service Bus transport.
Using the transport, Oracle Service Bus can make full use
of data services.
This approach also allows a more efficient and flexible
approach to accessing data services as compared with
exposing such services as web services.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services B - 11


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to describe:
SB transport
EJB transport
JEJB transport
Local transport
WS transport
MQ transport
HTTP and poll-based transports
Oracle Data Service Integrator transport
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Copyright 2012, Oracle and/or its affiliates. All rights reserved.


Delivery Methods
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services C - 2


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Objectives
After completing this lesson, you should be able to describe:
Delivery guarantee types
Delivery guarantee rules
Reliable messaging
Threading model
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Quality of service (QoS) is important because it allows you to determine the routing behavior
of messages.
The graphic in the slide shows a client sending a message to a service through Oracle
Service Bus (OSB).
Oracle Service Bus 11g: Design and Integrate Services C - 3
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Quality of Service
Specifies the quality of service expected when sending or
receiving a message
Client Service
OSB
Should the mailman
try to deliver this
message at once,
exactly once, or give
it his best effort?
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services C - 4


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Delivery Guarantees
OSB supports reliable messaging.
When messages are routed to another service from a
route node, the default quality of service element in
$outbound is either exactly-once or best-effort.
The value of the qualityOfService element in the
outbound context variable provides OSB with a hint for the
desired delivery behavior.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The default value of the qualityOfService element is exactly-once for a Route Node
action if the proxy service inbound transport is as follows:
Email
FTP
File
JMS/XA
Secure File Transfer Protocol (SFTP)
Transactional Tuxedo
The default value of the qualityOfService element is best-effort for the following:
Service Callout action: Always best-effort, modifiable
Publish action: Defaults to best-effort, modifiable
Note: When the value of the qualityOfService element is best-effort for a Publish
action, all errors are ignored. However, when the value of the qualityOfService element
is best-effort for a Route Node action or a Service Callout action, any error raises an
exception.
The table in the slide describes the delivery reliability for each type.
Oracle Service Bus 11g: Design and Integrate Services C - 5
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Delivery Guarantee Types
Delivery Reliability Description
exactly-once
exactly-once means that reliability is optimized.
It is a hint rather than a directive. When it is specified,
exactly-once reliability is provided (if possible).
at-least-once
at-least-once delivery semantics are attempted
if exactly once is not possible, but the
qualityOfService element is exactly-once.
best-effort
best-effort delivery is performed if exactly-once
and at-least-once delivery semantics are not
possible, but the qualityOfService element is
exactly-once. best-effort means that
performance or availability is optimized.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

If the inbound proxy service is not Java Message Service (JMS) and the invoker is another
proxy service, the inbound transport of the invoking proxy service is responsible for the
delivery guarantee. This is because a proxy service that invokes another proxy service is
optimized into a direct invocation if the transport of the invoked proxy service is not JMS.
No delivery guarantee is provided for responses from a proxy service. The delivery guarantee
process is triggered after OSB receives a message. Configuring the environment to maximize
this occurrence is the key.
To support at-least-once and exactly-once delivery guarantees with JMS, you must
exploit JMS transactions and configure a retry count and retry interval on the JMS queue. This
ensures that the message is redelivered in the event of a server crash or a failure that is not
handled in an error handler with a Reply or Resume action. File, FTP, and email transports
also internally use a JMS/XA queue. The default retry count for a proxy service with a JMS/XA
transport is 1.
Oracle Service Bus 11g: Design and Integrate Services C - 6
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Delivery Guarantee Rules
The delivery guarantee that is supported when a proxy service
publishes a message or routes a request to a business service
depends on the following conditions:
Value of the qualityOfService element
Inbound transport (and connection factory if applicable)
Outbound transport (and connection factory if applicable)
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

If the transport of the inbound proxy service is file, FTP, email, transactional Tuxedo, or
JMS/XA, the request processing is performed in a transaction.
When the qualityOfService element is set to exactly once, any Route Node and
Publish actions executed in the request flow to a transactional destination are performed
in the same transaction.
When the qualityOfService element is set to best-effort for any action in a
Route Node, Service Callout, or Publish, actions are executed outside of the request
flow transaction.
If an error occurs during request processing, but is caught by a user error handler that
manages the error (by using the Resume or Reply action), the message is considered
successfully processed and the transaction commits. A transaction is aborted if the
system error handler receives the errorthat is, if the error is not handled before
reaching the system level. The transaction is also aborted if a server failure occurs
during request pipeline processing.
If a response is received by a proxy service that uses a JMS/XA transport to business
service (and the proxy inbound is not transactional Tuxedo), the response processing is
performed in a single transaction.
- When the qualityOfService element is set to exactly-once, all Route,
Service Callout, and Publish actions are performed in the same transaction.
- When the qualityOfService element is set to best-effort, all Publish
actions and Service Callout actions are executed outside of the response flow
transaction.
- The proxy service responses that are executed in the response flow to a JMS/XA
destination are always performed in the same transaction, regardless of the
qualityOfService setting.
If the proxy service inbound transport is transactional Tuxedo, the request processing
and response processing are performed in this transaction.
You encounter a runtime error when the inbound transport is transactional Tuxedo and
the outbound transport is an asynchronous transport (for example, JMS/XA).
Oracle Service Bus 11g: Design and Integrate Services C - 7
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

You cannot override the qualityOfService element attribute for a Service Callout action.
To override the qualityOfService element attribute, you must set qualityOfService in
the outbound message context variable ($outbound). The value of the qualityOfService
element is used only for a proxy services outbound transport in the case of HTTP, HTTPS,
and JMS transports.
Oracle Service Bus 11g: Design and Integrate Services C - 8
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Overriding the Default Element
You can override the default qualityOfService (QoS)
element attribute for the following:
Route Node action
Publish action
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus supports reliable messaging. When messages are routed to another
service from a route node, the default quality of service (QoS) is exactly-once if the proxy
transport is JMS/XA.
exactly-once reliability means that messages are delivered from inbound to outbound
exactly once, assuming that a terminating error does not occur before the outbound message
send is initiated. exactly-once delivery reliability is a hint, not a directive.
When exactly-once is specified, exactly-once reliability is provided if possible. If
exactly-once is not possible, at-least-once delivery semantics are attempted; if that is
not possible, best-effort delivery is performed.
The graphic in the slide shows a schematic of JMS/XA in/out transport.
Oracle Service Bus 11g: Design and Integrate Services C - 9
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Reliable Messaging Support
How is exactly-once determined for JMS/XA in/out transport?
If the received message is dispatched to outbound
JMS/XA transport without message loss, there is success.
JMS/XA
Proxy
Service
Business
Service
Definition
OSB
Transport
Transport
JMS
Destination
JMS
Destination
JMS/XA
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

at-least-once semantics means that the message is delivered to outbound from inbound
at least once, assuming that a terminating error does not occur before the outbound message
send is initiated. If failover URLs are specified, at-least-once semantics are provided with
respect to at least one of the URLs.
best-effort means that there is no reliable messaging and no elimination of duplicate
messages; however, performance is optimized.
The graphic in the slide shows a schematic of JMS/XA inbound and non-JMS/XA outbound
transport.
Oracle Service Bus 11g: Design and Integrate Services C - 10
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Reliable Messaging Support
JMS/XA inbound and non-JMS/XA outbound: QoS goal is
exactly-once.
QoS Success: Message is transferred at least once from
the input transport to the output transport without loss of
the message.
QoS fallback sequence:
exactly-once > at-least-once > best-effort
JMS/XA
Proxy
Service
Business
Service
Definition
OSB
Transport
JMS
Destination
JMS
Destination
File
FTP
Email
HTTP
HTTPS
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

If the proxy inbound is JMS/XA and if the outbound transport for a Publish action or a Route
action is JMS/XA, the system ensures that the message is transferred exactly once from the
input transport to the output transport without loss of message or duplication of delivery.
For the remainder of the transport protocols (email, FTP, file, HTTP, HTTPS, and
JMS/nonXA), when the proxy inbound is JMS/XA, the system ensures that the message is
transferred at least once from the input transport to the output transport without loss of
message.
The graphic in the slide is a representation of the communication between the client and OSB.
Oracle Service Bus 11g: Design and Integrate Services C - 11
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Configuring Delivery Behavior
When the inbound transport is JMS or JMS/XA:
Delivery guarantees are based on JMS inbound retries
Configure retryCount and determine what to do if the
count is exhausted in the WebLogic Server Administration
Console
Client OSB
Delivery guarantees are based
on JMS inbound retries.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

The guarantee of delivering the message at least once for HTTP(S) requires further
explanation. Even for a case in which a target service responds (with a fault or HTTP status),
it is assumed that the delivery was completed. In other words, even though the target service
returned an authentication error or page not found error (for example), the server was
available and the service had an opportunity to process the message. However, if the proxy
server or the target server crashes during message transfer, the target server is not running,
or the response times out, the message is redelivered.
The graphic in the slide shows a service returning an error via HTTP.
Oracle Service Bus 11g: Design and Integrate Services C - 12
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
HTTP(S) Quality of Service Success
Any response from the target service, including an error
response, regardless of QoS:
If the target server is not running or the message delivery
timeout is reached, no response is received; QoS is not
met.
Service
Service returning error
via HTTP
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Split the service into two proxy services. The first one uses the unreliable transport whose
only task is to quickly route to the second proxy service that uses a JMS/XA transport. Using
this technique, the message that arrives is immediately persisted in the JMS queue by the first
proxy, and the second proxy can reliably process it in the background without the fear of
losing the message and with a guarantee of at-least-once semantics (or, in some cases,
exactly-once semantics) with respect to the second proxy service.
Oracle Service Bus 11g: Design and Integrate Services C - 13
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Handling Unreliable Transports
To make unreliable transports (non-JMS/XA) reliable:
Refactor the proxy service
Refactor the business services
To refactor the proxy service:
1. Split the service into two proxy services. The first one uses
the unreliable transport whose only task is to quickly route
to the second proxy service that uses a JMS/XA transport.
2. Ensure at-least-once delivery semantics to the second
proxy service.
To refactor the business service, use a JMS/XA proxy
service as the front end that other proxy services
can route to.
This ensures at-least-once delivery semantics.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

In a request or response flow publish action, responses are always discarded because
publish actions are inherently a one-way message send.
Oracle Service Bus 11g: Design and Integrate Services C - 14
Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Threading Model
The Oracle Service Bus threading model works as follows:
The request and response flows in a proxy service execute
in different threads.
Service callouts are always blocking. An HTTP route or
publish action is nonblocking (for request/response or one-
way invocation) if the value of the qualityOfService
element is best-effort.
JMS route actions or publish actions are always
nonblocking, but the response is lost if the server restarts
after the request is sent because Oracle Service Bus has
no persistent message processing state.
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

Oracle Service Bus 11g: Design and Integrate Services C - 15


Copyright 2012, Oracle and/or its affiliates. All rights reserved.
Summary
In this lesson, you should have learned how to describe:
Delivery guarantee types
Delivery guarantee rules
Reliable messaging
Threading model
S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s

S
a
n
d
a
n
a

J
a
w
a
h
a
r

(
s
j
a
w
a
h
a
r
@
d
e
l
o
i
t
t
e

c
o
m
)

h
a
s

a

n
o
n
-
t
r
a
n
s
f
e
r
a
b
l
e
l
i
c
e
n
s
e

t
o

u
s
e

t
h
i
s

S
t
u
d
e
n
t

G
u
i
d
e

U
n
a
u
t
h
o
r
i
z
e
d

r
e
p
r
o
d
u
c
t
i
o
n

o
r

d
i
s
t
r
i
b
u
t
i
o
n

p
r
o
h
i
b
i
t
e
d


C
o
p
y
r
i
g
h
t


2
0
1
3
,

O
r
a
c
l
e

a
n
d
/
o
r

i
t
s

a
f
f
i
l
i
a
t
e
s