Vous êtes sur la page 1sur 156

Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rry
r He
fu
Go
Oracle Service Bus 12c:
Administration

Activity Guide
D88517GC10
Edition 1.0 | July 2015 | D91946
Learn more from Oracle University at oracle.com/education/
Copyright © 2015, 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.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

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. Government’s rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted
ns e
by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract.
i c e
Trademark Notice
b lel
f e r a
owners.
an s
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective

n - t r
Author
a no
Cindy Church
h a s eฺ
m ) u id
Technical Contributors and Reviewers
l ฺ o nt G
cRobert
Mary Peek, Takyiu Liu, David J. Mills, Iris i
a tudeWunderlich, Matt Slingsby, Jay Kasi,
Li,
Armando Hernandez, William Prewittg m S
h @ i s
Editors
o f ur se th
g oNikita
Smita Kommini, Raj(Kumar,
o u Abraham
a n t t
r y
H erBopaiah
Graphic Designer

fur
Seema
Go Publisher
Jobi Varghese, Jayanthy Keshavamurthy

This book was published using: Oracle Tutor


Table of Contents
Password document for Oracle Service Bus 12c Administration

Practices for Lesson 1: Introduction ..............................................................................................................1-1


Practices for Lesson 1....................................................................................................................................1-2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Practices for Lesson 2: Getting Started with Oracle Service Bus ...............................................................2-1
Practices for Lesson 2....................................................................................................................................2-2
Practices for Lesson 3: Installing Oracle Service Bus 12c ..........................................................................3-1
Practices for Lesson 3: Overview ...................................................................................................................3-2
Practice 3-1: Installing Oracle Service Bus 12c .............................................................................................3-3
Practice 3-2: Installing Service Bus Schemas by Using the Repository Creation Utility .................................3-9
Practice 3-3: Creating a WebLogic Domain for Oracle Service Bus...............................................................3-15
Practice 3-4: Deploying Web Service Applications.........................................................................................3-25
nse
Practice Solutions ..........................................................................................................................................3-27
i c e
Practices for Lesson 4: Service Bus Administration Tools .........................................................................4-1 l

r a
Practices for Lesson 4: Overview ...................................................................................................................4-2 ble
s fe
Practice 4-1: Testing a SOAP-Based Pipeline ...............................................................................................4-3
n
t r a
Solution Instructions .......................................................................................................................................4-12
-
n on
Practices for Lesson 5: Service Bus Management Fundamentals ..............................................................5-1

s a ฺ
Practices for Lesson 5: Overview ...................................................................................................................5-2

) a
h uide
Practice 5-1: Managing Service Bus Sessions ...............................................................................................5-3

l ฺ com ent G
Practice 5-2: Customizing a Service Bus Configuration .................................................................................5-9
Practice 5-3: Managing Service Bus Using WLSTi.........................................................................................5-16
(Optional) Practice 5-4: Propagating a Service
g maBus Configuration
S tud .................................................................5-22
f u r h@ this
Solution Instructions .......................................................................................................................................5-30

( g o and
Practices for Lesson 6: Reporting
u e
sMonitoring .......................................................................................6-1

a
Practice 6-1: n to ServicetoHealth .........................................................................................................6-3
Practices for Lesson 6:
Monitoring
Overview ...................................................................................................................6-2

e rry6-2: Defining Service-Level Agreements ..........................................................................................6-9


Practice
H
fur Practice 6-3: Analyzing Service Bus Reports .................................................................................................6-18
Go Solution Instructions .......................................................................................................................................6-22
Practices for Lesson 7: Service Bus Security ...............................................................................................7-1
Practices for Lesson 7: Overview ...................................................................................................................7-2
Practice 7-1: Configuring the Security Environment .......................................................................................7-4
Practice 7-2: Applying a Security Policy to Proxy Services ............................................................................7-9
Practice 7-3: Testing the Proxy Service Security Implementation ..................................................................7-13
Practice 7-4: Propagating Identity from Service Bus to Secured Web Service ..............................................7-18
Solution Instructions .......................................................................................................................................7-30
Practices for Lesson 8: Service Bus High Availability .................................................................................8-1
Practices for Lesson 8: Overview ...................................................................................................................8-2
Practice 8-1: Creating a Service Bus Cluster .................................................................................................8-3
Practice 8-2: Initializing a Service Bus Cluster ...............................................................................................8-11
Practice 8-3: Load Balancing Service Endpoint .............................................................................................8-15
Practice Solutions ..........................................................................................................................................8-21

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

Oracle Service Bus 12c: Administration Table of Contents


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Go
fu
rHe
rr
y
ant
o (
f
t
u
go o us
g
i
rh@e this
l ฺ
m
ma Stud
) h a
co ent G
u
a
id
no
s eฺ
n - t r an
s
f e r a
l
el b
i c e
e ns
Password document for Oracle Service Bus 12c Administration

Server and Cluster passwords


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Username: weblogic

password: welcome1

Database
nse
Sys: dba
i c e
bl el
password: welcome1
f e r a
ans
n - t r
Database Schema PROD a no
h a s eฺ
password: oracle m ) u id
i l ฺ co ent G
g ma Stud
Database Schema PROD1 urh
@ his
o f e t
(g to u s
t
password: oracle
n o
r y a
H er
fur
Go Database Schema PROD2

password: oracle

username: jdoe

password: welcome1

username: joe

password: welcome1
For Practice 7-3, step 2d

username: joe

password: notwelcome1
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
noLesson 1:
Practices for
a
) u id has eฺ
Introduction
m
o n1t G
cChapter
i l
a tudeฺ
g m S
h @ i s
o f ur se th
t o (g to u
rr y an
r He
fu
Go

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

Practices for Lesson 1: Introduction


Chapter 1 - Page 1
Practices for Lesson 1

There are no practices for this lesson.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 1: Introduction


Chapter 1 - Page 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
Practices for
a noLesson 2:
Getting
h a sStartedeฺ with Oracle
) u i d
om t GBus
Service
a ilฺcChapter
d en2
g m S t u
@
rh e thi s
f u
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 2: Getting Started with Oracle Service Bus


Chapter 2 - Page 1
Practices for Lesson 2

There are no practices for this lesson.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 2: Getting Started with Oracle Service Bus


Chapter 2 - Page 2
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
Practices for
a noLesson 3:
s Oracle
Installing
h a eฺ Service Bus
) i d
om t Gu
12c
a ilฺcChapter
d en3
g m S t u
@
rh e thi s
f u
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 1
Practices for Lesson 3: Overview
Practices Overview
In the practices for this lesson, you:
• Install Oracle Service Bus 12c
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

• Run the Oracle Repository Creation Utility to create the Service Bus schemas (to
support the reporting feature and Oracle WSM policies)
• Create a WebLogic domain for Oracle Service Bus
• Deploy back-end web service applications
The Oracle WebLogic Server 12.1.3.0 software has already been installed on the classroom
machines.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 2
Practice 3-1: Installing Oracle Service Bus 12c
Overview
In this practice, you install the Oracle Service Bus 12c software.

Assumptions
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

• The Oracle WebLogic Server 12.1.3.0.0 software must be installed in the Oracle
Middleware Home directory /u01/app/oracle/fmw_admin/12.1.3.0/wlserver.
(This has been installed for you.)
• Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 is installed.
• The /home/oracle/stage directory must contain the software for Oracle Service Bus
12c 12.1.3.0.
The following environment variables are used in the lab environment and are included in your
nse
.bash_profile file:
i c e
MIDDLEWARE_HOME=/u01/app/oracle/fmw_admin/12.1.3.0
bl el
JAVA_HOME=/usr/java/jdk1.7.0_71
f e r a
ans
Tasks
n - t r
1. no
In a terminal window, navigate to the installation directory.
a
$ cd /home/oracle/stage
h a s eฺ
2. Start the Service Bus installation by invokingm u id from the JDK directory
the) java executable
on your system. i l ฺ co ent G
g ma Stud –jar fmw_12.1.3.0.0_osb.jar
$ /usr/java/jdk1.7.0_71/bin/java
rh@some
The Oracle installer performs
f u t h is checks and launches the installation wizard.
system
g o using
3. Complete the installation
( u sethe graphical user interface by following the steps below:
a. ClicknNext
a to
to in the Welcome screen.
y
b. rrSelect the Oracle home directory /u01/app/oracle/fmw_admin/12.1.3.0 using
H e the drop-down menu.
fu r
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 3
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
l ฺ o current
c. Review the Feature Sets included incthe
n G
tinstallation, and then click Next.
i e
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 4
d. Review the Installation Type, and then click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

e. After the installer does the installation prerequisite checks, click Next.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 5
f. Click Install on the Review the Installation Summary screen.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 6
g. Watch the Installation Summary screen and wait for it to reach 100% complete. All
items should have a green check mark in the first column.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
h. Click Next.
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 7
i. Review the Installation Complete screen and click Finish when you are done. The
screen shows the next steps in the installation process.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 8
Practice 3-2: Installing Service Bus Schemas by Using the Repository
Creation Utility
Overview
In this practice, you run RCU version 12.1.3.0.0 to create the schemas in the Oracle Database
11g standard edition database instance.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Assumptions
• Oracle Service Bus 12.1.3.0.0 is installed on the system.
• Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 is installed.

Tasks
1. Open a terminal window. e
2. Navigate to the directory that has the rcu script.
c e ns
el i
$ cd /u01/app/oracle/fmw_admin/12.1.3.0/oracle_common/bin
a bl
3. Confirm that JAVA_HOME is set to the correct path. f e r
ans
a. To confirm that the environment variable is set correctly, enter the following command:
n - t r
$ java -version
a no
b. Ensure that the Java version is 1.7.0_71, as shown
h a s in theeimage:

)
m t Gu i d
c o
m ailฺ tuden
@ g S
c. If you do not see thathJava
r t h i s
version, then set JAVA_HOME to
f u
o use
/usr/java/jdk1.7.0_71.
( g
a n to
toMIDDLEWARE_HOME
4. Confirm that is set to the correct path.

e r $y ls
a. rTo confirm that the environment variable is set correctly, enter the following command:
H
fur
$MIDDLEWARE_HOME

Go b. Ensure that you see these directories included in the list: osb, oracle_common,
wlserver.

c. If you do not see those directories, then set MIDDLEWARE_HOME.


5. Run the script.
$./rcu
6. Click Next on the Welcome screen.
7. Accept the default Create Repository option with the System Load and Product Load
options selected and click Next.

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 9
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
8. Enter the following information on the Database Connection Details screen:
bl el
Host Name: localhost
f e r a
Port: 1521
ans
Service Name: orcl n - t r
Username: sys a no
h a s eฺ
Password: See the OracleServiceBus12cPassword file.
m ) u id
Role: SYSDBA
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

9. Click Next.

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 10
10. After the prerequisite checks have passed, click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
11. Select “Create new prefix” and enter PROD.
ans
12. Expand AS Common Schemas in the Component table and make the following selections, n - t r
and then click Next:
a no
Metadata Services
h a s eฺ
Audit Services m ) u id
Audit Services Append i l ฺ co ent G
Audit Services Viewer g ma Stud
f u rh@e this
Oracle Platform Security Services

o ( go o us
User Messaging Service

ant
WebLogic Servicest
rr y
Oracle Enterprise Scheduler
r He Common Infrastructure Services (selected by default)
fu
Go SOA Suite
SOA Infrastructure

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 11
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
13. Verify that the prerequisite checks have passed)and thenu
m id OK.
click
l
14. Select Use same passwords for all schemas ฺ G the password as follows, and
co eandntenter
i
then click Next:
g ma Stud
r h @ his
Password: See the OracleServiceBus12cPassword file.
Confirm Password:oSee e t
fu the sOracleServiceBus12cPassword file.
( g u
a n to to
e rry
H
fur
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 12
15. Accept the default custom variables and then click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

16. Click Next on the Map Tablespaces screen.


nse
a. Click OK in the dialog box to create any tablespaces that do not already exist in the i c e
schema.
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

b. When the table creation is complete, click OK.

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 13
17. Review the Summary Creation information and then click Create.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
18. Verify that each of the component schemas
i l ฺ e n t aGSuccess status, and then click
coindicates
m a tud
Close. Do not close the terminal window. You can use it in the next section.
@ g S
h i s
o f ur se th
t o (g to u
y a n
er r
H
fur
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 14
Practice 3-3: Creating a WebLogic Domain for Oracle Service Bus
Overview
In this practice, you create a WebLogic domain for Oracle Service Bus.

Assumptions
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

• The Oracle WebLogic Server 12.1.3.0.0 software must be installed in the Oracle
Middleware Home directory /u01/app/oracle/fmw_admin/12.1.3.0.
• The Oracle Service Bus 12c 12.1.3.0.0 is installed into the specific Oracle Home
directory /u01/app/oracle/fmw_admin/12.1.3.0.
• The Oracle Database 11g instance is running with the required Service Bus schemas.

Tasks e
1. Start the Oracle Fusion Middleware Configuration Wizard by entering the following
c e ns
commands in a terminal window:
el i
a bl
$ cd /u01/app/oracle/fmw_admin/12.1.3.0/oracle_common/
f e r
common/bin
ans
$ ./config.sh
n - t r
2. no
In the Domain Location field, leave the directory the same, except replace base_domain
a
with osb_domain.
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

3. Click Next.
4. Choose the templates.
a. Select Create Domain Using Product Templates.
b. Select the following available templates:
− Oracle Service Bus – 12.1.3.0 [osb]
− WebLogic Advanced Web Services for JAX-RPC Extension – 12.1.3.0
[oracle_common]
− ODSI XQuery 2004 Components – 12.1.3.0 [oracle_common]
− Oracle Enterprise Manager – 12.1.3.0 [em]
− Oracle WSM Policy Manager – 12.1.3.0 [oracle_common]
− Oracle JRF – 12.1.3.0 [oracle_common]
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 15
− WebLogic Coherence Cluster Extension – 12.1.3.0 [wlserver]
c. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
maverifySthe
5. On the Application Location screen,
g t uddomain name and location, and then click
Next.
f u r h@ this
( g o use
Domain name: osb_domain
to
Domain location:
a n to
rry location:
/u01/app/oracle/fmw_admin/12.1.3.0/user_projects/domains

H e
Application
fur /u01/app/oracle/fmw_admin/12.1.3.0/user_projects/applications/osb_domain
Go

6. Configure the Administrator user name and password using the following settings, and then
click Next:
Name: See the OracleServiceBus12cPassword file.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 16
Password: See the OracleServiceBus12cPassword file (enter twice to confirm).
7. Select Production for Domain Mode and Oracle HotSpot 1.7.0_71/usr/java/jdk1.7.0_71 for
JDK, and then click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
8. Enter the following settings for the Database Configuration Type, and then click Next: ans
Vendor: Oracle n - t r
a no
Driver: *Oracle’s Driver (Thin) for Service connections; Version
9.0.1 and later h a s eฺ
m ) u id
DBMS/Service: orcl
i l ฺ co ent G
ma Stud
Host Name: localhost
Port: 1521 g
u rh@e this
Schema Owner: PROD_STB
f
( go oSee
Schema Password:
o u sthe OracleServiceBus12cPassword file.
a
Note: ThentSchema Ownerst in this table must match the value that you assigned to schema
y
err because
owners
Hprefix
earlier when you ran the RCU utility. Do not leave it at the default with the DEV

fur9.
that is used for a different course.

G o Click the Get RCU Configuration button to retrieve the database schema.

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 17
10. When the message “Successfully Done” is displayed, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ
11. Click Next on the Component Datasources coscreen.
e n tG
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 18
12. After the datasources have been successfully created, click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l
Note: This creates a default domain with ฺ e n t G server and one Service Bus
cano administration
ma Stud
managed server called osb_server1.
g
f u rh@e this
o ( go o us
a nt t
rr y
r He
fu
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 19
13. Select Administration Server and Managed Servers, Clusters and Coherence on the
Advanced Configuration screen, and then click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
ma SServer
14. Enter the following on the Administration
g t ud screen, and then click Next:
Name: AdminServer
f u r h@ this
( g o use
Listen Address: localhost
Listen Port:to
a n 7001 to
rry Groups: Unspecified
Server
e
H
fur
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 20
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
15. Enter the following on the Managed Server screen,
m u idclick Next:
) and then
Name: osb_server1 i l ฺ co ent G
Listen Address: localhost gm
a tud
h @ i s S
Listen Port: 7003
o f ur se th
t o (g to u
Server Groups: OSB-MGD-SVRS-COMBINED

y a n
er r
H
fur
Go

16. Click Next on the Clusters and Coherence Clusters screens.


17. Click Next on the Machines screen. This step is necessary if you are managing several
servers, but it is not required for your classroom purposes.

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 21
18. Review the details on the Configuration Summary screen, and then click Create.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
l
19. When the Configuration Progress reaches
i ฺ t GNext.
co100%,enclick
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 22
20. Review the information on the Configuration Success screen, and click Finish.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
m a tud
@
21. Start the administration server.g S
h
r eways i s
th to start the server. You can simply double-click the
a. There are several
o f udifferent
s
t o (g to u
y a n
er r
ur H
f Start SA Admin Server icon on the desktop and enter the
Go administrative credentials (See the OracleServiceBus12cPassword file) when
prompted. Or you can execute the following commands:
1) Open a new terminal window, and navigate to the
/u01/app/oracle/fmw_admin/12.1.3.0/user_projects/domains/osb_
domain/bin directory.
2) Enter the following command:
$ gnome-terminal -–title “AdminServer” –e ./startWebLogic.sh
If prompted, enter the administrative credentials: weblogic/ See the
OracleServiceBus12cPassword file.
Note: This command starts the server in a separate terminal window with the
appropriate title so that you do not confuse it with other terminal windows. You can
also start it by using a separate terminal window with just the
./startWebLogic.sh command.
Tip: If you prefer, create a boot.properties file for the domain to avoid
supplying credentials on subsequent server restarts.

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 23
b. The server will take a couple of minutes to start up. Make sure that you see the
message “Server started in RUNNING mode” to confirm that the Administration
server is running.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
22. Start the Service Bus managed server.
ans
a. Similarly, start the Service Bus managed server by double-clicking the Start SA OSB n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
Server icon on the desktop
g ma Stud and
(see the OracleServiceBus12cPassword
enter the administrative credentials
file) when prompted. Or you can
@ his
rhcommand:
execute the following
o f u e t
( g ou
$ gnome-terminal s
-–title “SB Server” –e
n t o t
“./startManagedWebLogic.sh osb_server1”
y a
HerrWhen prompted, enter the administrative credentials: See the
OracleServiceBus12cPassword file.
r
G ofu Note: You can also start it by using a separate terminal window with just the
./startManagedWebLogic.sh osb_server1 command.
b. It will take a couple of minutes to start. Make sure that you see the message “Server
started in RUNNING mode” to confirm that the Service Bus managed server is
running.
c. Minimize the terminal windows but do not close them. If you close these windows, it will
shut down the servers, and you will need to start them again.

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 24
Practice 3-4: Deploying Web Service Applications
Overview
In this practice, you deploy the back-end web service applications that will be used in later
practices.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Tasks
1. Deploy the back-end web service applications:
a. Open a terminal window and navigate to the practices directory:
$ cd /home/oracle/labs_SA/Practice_03
b. Deploy the service applications by using the following command:
$ ./deploy_apps.sh
Wait until you see the message Deployment of service applications complete! The nse
i c e
2.
Deployment State for each of the six applications should be completed.
Verify that all the back-end web service applications are deployed on the WebLogic bl el
administration server and are running. f e r a
ans
a. Double-click the Firefox Web Browser launcher on the desktop and start the Oracle
Enterprise Manager Fusion Middleware Control (EM) Console by entering the following n - t r
URL: a no
http://localhost:7001/em
h a s eฺ
m )
b. Log in using (see the OracleServiceBus12cPassword u id file) credentials.
i l ฺ
If you see an Accessibility Preferences codialog
e n t Gclick Continue.
box,
g maexpand
c. In the Target Navigation section,
S tudWebLogic Domain > osb_domain >
AdminServer.
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

d. In the Application Deployments section, verify that the following applications are listed
under Application Deployments:
• CreditCardValidationService_WS
• OrderServices
• OrderStatusApplication
• PaymentServices
• ServiceA_App-Service_A-context-root
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 25
• ServiceA_App-Service_B-context-root
• ServiceA_App-Service_C-context-root
• ShippingServices
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

ns e
l
Note: If you do not see these applications, go back to the terminal window where youeran i c e
b
the deployment script and check back through the messages to see what causedathem to l
fail. s f er
- t r an
n on
s a ฺ
) a
h uide
i l ฺ com ent G
g ma Stud
f u rh@e this
o ( go o us
a nt t
rr y
r He
fu
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 26
Practice Solutions
If you do not have time to complete these practices, perform the following steps.
Alternatively, you might face a situation where you made an error while creating the Service Bus
domain, or during the course of performing the practices, the Service Bus domain crashes.
Follow the instructions in Step 3 as follows to re-create the Service Bus domain to its original
state. In this case, the database schemas must already exist and Oracle Service Bus 12c must
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

be installed. Your instructor can give you information for uninstalling a domain, if necessary.

Tasks
1. Install Oracle Service Bus 12c by following the instructions in Practice 3-1.
2. Create the schemas in the database:
a. In a terminal window, navigate to the Solutions directory:
$ cd /home/oracle/labs_SA/Practice_03/Solutions
nse
b. Run the script to create the schemas using RCU: i c e
$ ./create_schemas.sh bl el
f e r a
Verify that the schema was properly created.
ans
n - t r
a no
h a s eฺ
3. Create the Service Bus domain.
m ) u id
a. Create the Service Bus domain following
i l ฺ n t G in 3-3
co theeinstructions
b. Start the WebLogic administration a server
mthe tofud
and Service Bus managed server by
g
following the instructions near endS Practice 3-3. The back-end service

f u h@ twhen
applications will be rdeployed h is the administration server starts.
c. Complete Practice
( g se 1.
o 3-4,ustep
d. Verify
a n to service applications are deployed and running on the WebLogic
o all the web
tthat
y
rradministration server by following the instructions in Practice 3-4, step 2.
H e
fur
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 27
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 3: Installing Oracle Service Bus 12c


Chapter 3 - Page 28
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
Practices for
a noLesson 4:
Service
h a sBus eAdministration

) i d
om t Gu
Tools
a ilฺcChapter
d en4
g m S t u
@
rh e thi s
f u
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 1
Practices for Lesson 4: Overview
Practices Overview
In this practice, you test a SOAP-based proxy service. You familiarize yourself with the Test
Console and the information it has to offer, including the Request Document, Response
Document, and Response Metadata. You also generate an error with one of the proxy services
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

and use the Invocation Trace to see the proxy service error.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 2
Practice 4-1: Testing a SOAP-Based Pipeline
In this practice, you will use the Fusion Middleware Control Console to:
• Test a SOAP-based pipeline
• View an error message in the Test Console
• Trace the invocation
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

This shows the message flow diagram of the specific services to be tested.
ShippingService Diagram (SOAP-Based Service):

nse
i c e
bl el
Assumptions f e r a
• The Oracle Service Bus 12c 12.1.3.0 is installed and is running. ans
• The back-end web service applications have been deployed and are running. n - t r
a no
Note: Throughout the practice guides, the abbreviation FMWC refers to the Enterprise
Manager Fusion Middleware Control console. h a s eฺ
m ) u id
Tasks
i l ฺ co ent G
1. Deploy the Service Bus project. ma tud
g S
f u rh@and
a. Open a terminal window
t h is to the
navigate
o use
/home/oracle/labs_SA/Practice_04/deploy_projects
( g
directory.

n t t o practices) into
b. Executeothe deploy_projects.sh script to load the Service Bus project for this

r y a
practice (and subsequent the WebLogic domain.

H er $ ./deploy_projects.sh
fur You should see the following messages at the end:
Go ...
Creating a session...

Read binary file...


Importing the project...
Activating the session...
Disconnected from weblogic server: AdminServer

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 3
2. Test the ShippingService pipeline.
a. In a browser window, log in to the FMWC Console at http://localhost:7001/em as
weblogic/ See the OracleServiceBus12cPassword file.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 4
b. In the Target Navigation section, expand SOA > service-bus (AdminServer) >
Practice_04.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
c. Navigate to Service Bus Project > Home >
m u id
) Operations.
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 5
d. In the Operations section, select the Shipping Service pipeline.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
e. Click the Test button to launch the Test Console.
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

f. The Test Console launches in a separate browser window. The shipOrder operation
takes shipping information and returns a tracking number. In the Payload section, click
Browse, navigate to /home/oracle/labs_SA/Practice_04/resources, and
open Payload.txt.
Note: This proxy service has only one operation; but if it had more, you would start by
selecting the operation that you want to test from Available Operations.

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 6
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
g. Click Execute to test the pipeline.
h a s eฺ
h. Observe the Request Document and the Response
m ) u id
Document and answer the
o G
ilฺc dent
following questions:
a
1) What is the shipper’s first name?
mname?Stu
g
rh@type?
2) What is the shipper’s last
u
3) What is thefshipping t h is
( g o was
4) What response u e
sreturned by the pipeline service?
n t o t o
r r ya
H e
fu r
Go

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 7
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

Answers:
1) Harry
2) Potter
3) Fedex
4) Tracking number: Hr14d683c1-3407-407a-a0d0-ee4824066055 (or something
similar)

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 8
i. Scroll down to the Invocation Trace section, expand RouteNode1, and then expand
added $transformedMsg. What did the proxy do to change the message? What is
the name of the shipper?
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
Answers: h a s eฺ
m id model. For example, it
) into theuFedex
i
concatenated the FirstNamel co(Harry)enandt G
a) The proxy transformed the message
ฺ LastName (Potter) to one Name,
HarryPotter. m a tud
b) The shipperhis@
g
fedEx. is S
j. Click Back to o f ur to the
return
s e th Console input page and change the
Test
o (g to u node in the Payload to ups.
<java:ShippingType>
t
y a n
er r
ur H
f
Go

k. Execute the test again and inspect Invocation Trace > RouteNode1 > Message
Context Changes > added $transformMsg. How does the UPS message type differ
from the fedEx one?

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 9
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
Answer: The first name and last name are kept separate and there is an address
h a s eฺ
element, Adr, which contains the separate address elements.
m ) u id
3. View an error in the Test Console.
i l ฺ co ent G
g ma Stud
a. Click Back to return to the Test Console input page. Change the
<java:OrderNumber> in the Payload to test.

f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

b. Execute the test.


c. Check the Response Document. Did the pipeline return a tracking number? If not, what
did it return?
Answer: The pipeline did not return a tracking number; instead it returned an Internal
Server Error.
d. Check the Invocation Trace. What is the fault code and reason?

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 10
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
b lel
e r a
a n sf
Answer: The fault code is Server. The reason is that the format was incorrect.
OrderNumber is meant to be a number and it received a string.tr
e. Close the Test Console. o n -
s an ฺ
) ha uide
i l ฺ com ent G
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 11
Solution Instructions
This practice deploys a Service Bus project and then tests the pipeline. If you do not have the
time to perform this practice, you can simply deploy the project, using the following steps:
1. Open a terminal window and change the current working directory to the
/home/oracle/labs_SA/Practice_04/deploy_projects directory.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

2. Execute the deploy_projects.sh script to load the Service Bus project for this practice
into the WebLogic domain.
3. You should see the following messages at the end:
...
Creating a session...

Read binary file...


nse
Importing the project...
i c e
Activating the session...
bl el
Disconnected from weblogic server: AdminServer
f e r a
4. To confirm that the projects were deployed successfully, perform the following:
ans
a. In a browser window, log in to the Service Bus Console at http://localhost:7001/em as n - t r
no
weblogic/ See the OracleServiceBus12cPassword file.
a
a
b. In the console, click Project Explorer and expand
h sthe Practice_04
eฺ Notification and
Shipping projects. )
m t Gu i d
c o
m ailฺ tuden
@ g S
h i s
o f ur se th
t o (g to u
y a n
er r
ur H
f
Go

5. Optionally, you can follow the instructions in Practice 4-1 steps 2 and 3 to test the pipeline.

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

Practices for Lesson 4: Service Bus Administration Tools


Chapter 4 - Page 12
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
Practices for
a noLesson 5:
Service
h a sBus eManagement

) i d
om t Gu
Fundamentals
a ilฺcChapter
d en5
g m S t u
@
rh e thi s
f u
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 1
Practices for Lesson 5: Overview
Practices Overview
In the practices for this lesson, you:
• Manage Service Bus sessions and resolve concurrency conflicts for a clean activation
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

• Create a customization file to automatically find and replace specific values


• Manage Service Bus by using WLST
• Propagate a Service Bus configuration from one domain to another (Optional practice)

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 2
Practice 5-1: Managing Service Bus Sessions
Overview
In this practice, you will start to become comfortable with session management in Service Bus.
Sessions are used when modifying properties in the administration console, so you will be
creating a session, modifying properties of Service Bus resources, and then activating those
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

changes. Before activating your changes, the console notifies you of any conflicts your changes
might have caused. You will practice resolving those conflicts for a clean activation.
You use two different browser instances to log in to two different Service Bus consoles. You
also use different user credentials to log in to simulate a conflicting scenario in modifying
Service Bus resources. For simplicity, let’s define:
Service Bus Console 1: Mozilla Firefox Web browser instance 1
Service Bus Console 2: Mozilla Firefox Web browser instance 2
nse
Tasks i c e
1. Set up the practice environment. bl el
a. In a Terminal window, navigate to f e r a
a n s
/home/oracle/labs_SA/Practice_05/create_user.
b. Execute the create_user.sh script to add a new administrativen r
-t user ("jdoe") to
o
osb_domain. Make sure you see the following message
s a nafter

executing the script:

) a
h uide
i l ฺ com ent G
Note: You can ignore any g
ma warnings
errors or S tud as long as the script indicates that "jdoe"
f u rh@e this
was created successfully.
c. Close all of g
( o openuweb
your s browsers.
2. Log in ton o
t Service Bus
the o
t Console as the weblogic user to create a new session. For this
rr y a
practice, call this console 1.
e
ur H
a. Open a Firefox web browser and navigate to the Service Bus Console at
f http://localhost:7001/servicebus.
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 3
b. Log in with the weblogic/ See OracleServiceBus12cPassword File
credentials.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
c. In the top-right corner, click Create to create a new session. i c e
bl el
f e r a
ans
n - t r
a no
h a s console
eฺas user jdoe to create a
3. Using a different web browser, log in to the Service
) Bus
m 2. Tot G i d
u two different web browser
c o
new session. For this practice, call this console simulate

option. m ailฺ tinuFirefox


instances, you can open a private session
d en using the New Private Window
@ g S Private Window.
h
a. In the Firefox browser, click Filei s
> New
o f ur se th
t o (g to u
y a n
er r
H
fur
Go

b. In the Private Window, navigate to the Service Bus Console at


http://localhost:7001/servicebus.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 4
c. Log in to the console with the jdoe/ See OracleServiceBus12cPassword File
credentials.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
d. In the top-right corner, click Create to create a new session. i c e
4. Create a concurrency conflict scenario. bl el
a. In console 1, click Resources in the left pane. f e r a
ans
b. You will use the same set of SB services that was available for Practice 04. Therefore,
in the Target Navigation section, navigate to Practice_04 > Shipping > Business n - t r
Services, and click LocalShippingService. a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 5
c. Navigate to the Configuration > Transport tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

d. Use the drop-down to change the Load Balancing Algorithm to Random.


nse
i c e
bl el
f e r a
ans
n - t r
a no
e. Click Save. h a s eฺ
m u id Select Random for the
)(Private Window).
f. Navigate to the same location in console
l
Load Balancing Algorithm, and ithen ฺ coclickeSave.
2
n tG
m a tud and click Activate.
@ g
g. In console 2, click Activate. Enter a description
S
h i s
o f ur se th
t o (g to u
y a n
er r
ur H
f
Go

h. Return to console 1 and activate the session. Were you able to activate the session? If
not, what message did you get?
Hint: You should have received a message about a concurrency conflict.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 6
i. In the Conflicts tab, select LocalShippingService.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

j. To resolve the concurrency conflict, select the LocalShippingService, and click the
Synchronize icon.

nse
i c e
bl el
f e r a
ans
n - t r
k.
no
Activate the session. Do not forget to add a description. Descriptions help if you need
a
to roll back, and when you are viewing sessions created by other users.
h a s eฺ
l. Log out and close console 2 (Private Window).
m ) u id
i l ฺ co ent G
5. Resolve a conflict.
g
a. Create a new session in console
ma1. Stud
b. In Project Explorer,
f u h@ ttohPractice_04
rnavigate is >Shipping > Business Services.
o
g box
c. Select the (check s e
u to LocalShippingService and click the Delete button.
next
n t o t o
r y a
H er
fur
Go

d. Click Yes when prompted about the delete.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 7
e. Notice that there is now a major conflict in the Conflict section. Click View Conflicts
and expand ShippingService to see what is causing the problem.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Because LocalShippingService is being used by a pipeline service, you do not


want to go ahead with the delete.
f. Click Discard to remove the changes, and then click Discard when prompted.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 8
Practice 5-2: Customizing a Service Bus Configuration
Overview
In this practice, you use the find-and-replace functionality of the Service Bus Console to locate
all the environment variables in the Service Bus configuration that match a certain value. This is
useful when migrating Service Bus configurations to an environment that might be set up
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

differently with different names, port numbers, and so on. You also create a customization file
that can be repeatedly used to automatically do the find and replace on environment variables.
This is particularly useful when frequently moving a configuration from a development to a
testing environment.
In this practice, you:
• Find and replace environmental values in a Service Bus configuration
• Create a customization file to automatically find and replace specific values
• Execute a customization file nse
i c e
Tasks bl el
1. Change the port number of the WebLogic server in osb_domain to 7101. f e r a
ans
a. Log in to the WebLogic Server Administration Console of osb_domain
n - t r
a no
(http://localhost:7001/console) using the weblogic/ See
OracleServiceBus12cPassword File credentials.
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go
b. Navigate to osb_domain > Environment > Servers, and click AdminServer(admin)
in the Summary of Servers section.

c. In the Change Center, click Lock & Edit.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 9
d. Change Listen Port to 7101.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
e rry
r He. Save your changes, and then in Resources, click Activate Changes. You might be
fu logged out automatically. If not, log out of the console.
Go f. Log in again to the WebLogic Administration Console at the new listen port to verify the
change.

2. In the Service Bus Console, find and replace values for the Service Bus projects to reflect
the new port number.
a. Log in to the Service Bus Console for osb_domain by specifying the new port number
in the URL (http://localhost:7101/servicebus) and using weblogic/ See
OracleServiceBus12cPassword File.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 10
b. In Resources, navigate to Practice_04 > Shipping > Proxy Service and test the
ShippingService proxy service.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

c. What happens when you test the service?


Answer: You receive a connection error.
nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
d. Create a new session.
f u r h@ this
g
number of (the
oService
e. To rectify the error
u seservices.
that you
Bus
received in the previous step, you need to change the port
Navigate to Admin > Configuration and select
n t o Replace.to
r r ya
Find and

H e
fu r
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 11
f. Find the value 7001 and replace it with 7101. Click Replace.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
g. Close the dialog box.
ans
h. How many environment variables were changed? n - t r
Answer: 4
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

i. Activate your session. Do not forget to add a description.


j. Retest the ShippingService proxy service. What happened this time?
Answer: It executed without any errors.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 12
3. Create a configuration file to automate the find and replace capabilities.
a. Return to the WebLogic Server Administration Console for osb_domain.
(http://localhost:7101/console).
b. Change the AdminServer Listen Port back to 7001, and then save and activate the
changes.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

c. Return to the osb_domain Service Bus Console. Log in again using


http://localhost:7001/servicebus.
Note: You may need to log out of the Service Bus Console and completely close and
reopen your Firefox browser to reset your login. This issue can occur because you
nse
have dynamically changed the port of the server.
i c e
d. Create a new session.
bl el
e. Navigate to Admin > Configuration and select Create Configuration File.
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 13
f. On the Create Configuration File page, ensure that Practice_04 is selected and
System is deselected, and then click Create.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
g. Save the customization file by selecting Save File and clicking OK. The file is saved
b l e l as
OSBCutomizationFile.xml in the Downloads folder. Close the Configuration
window. s f era
h. Edit OSBCutomizationFile.xml in a text editor such as gedit - t r aornEmacs (right-click
n
the file and select Open With > editor name), and replace oallnthe instances of 7101 with
s a ฺ
7001. Save and close the file after making the changes.
) a
h uide
i l ฺ com ent G
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

i. Return to the Service Bus Console and navigate to Admin > Configuration and select
Execute Configuration File.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 14
j. Browse to /home/oracle/Downloads and open the previously saved configuration
file. Click Next.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

k. Click Finish. Verify successful execution of the file.


l. Activate your session, and add the description.
m. Navigate to Resources > Practice_04 > Shipping > Proxy Service > and test the
ShippingService proxy service. nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
rh@
n. Verify that the test runs
f u t h is
successfully.
( g o use
a n to to
e rry
fur H
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 15
Practice 5-3: Managing Service Bus Using WLST
Overview
In this practice, you use a WLST script to manage some of the common administration tasks
you might encounter with Service Bus. You edit a script that exports the Practice_04 project
from osb_domain. Then you edit a script to import another project into osb_domain. This also
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

includes creating and activating a session. To do this, you use SessionManagementMBean


and ALSBConfigurationMBean.
In this practice, you:
• Export a configuration file in a WLST script
• Create a session in a WLST script
• Import a configuration file in a WLST script
• Activate a session in a WLST script
nse
i c e
Tasks
bl el
1. Modify a WLST script to export a Service Bus configuration file.
f e r a
a. Open the /home/oracle/labs_SA/Practice_05/wlst/export ans
/wlstScript_export.py file in a text editor (right-click the file and click Open with n - t r
no
Other Application, and then select a Text Editor.)
a
a s eฺ
b. Add the appropriate code as instructed at the appropriate location in the file. You will
h
) u id
see comments for where to add each line of code.
m
l ฺ co ent G
Note: Alternatively, you can replace the wlstScript_export.py file in the
i
ma Stud
/home/oracle/labs_SA/Practice_05/wlst/export directory with the already
g
rh@e this
edited wlstScript_export.py file from the
f u
/home/oracle/labs_SA/Practice_05/Solutions/wlst/export directory. If
( go o us
you do so, skip to Step 2 that follows.
o
ant t
c. This WLST script is already set up to import the appropriate classes needed for
rry
exporting a Service Bus configuration to a JAR file. It is also set up to connect initially
r He to the Administration Server in osb_domain.
fu
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 16
d. Use the findService method to obtain the ALSBConfigurationMBean Mbean for
performing the read-only operations. Assign the MBean to a variable that can be used
later. Add the following code to perform this task:
alsbCore = findService(ALSBConfigurationMBean.NAME,
ALSBConfigurationMBean.TYPE)
e. Create a new Ref object that identifies the Service Bus project. Assign it to a variable:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

projectRef = Ref(Ref.PROJECT_REF, Ref.DOMAIN, "Practice_04")


f. Add the Ref object to a new Java Collection.
collection = Collections.singleton(projectRef)
g. Export the Service Bus project using the export method of
ALSBConfigurationMBean. Assign the result to the theBytes variable.
theBytes = alsbCore.export(collection, true, None)
nse
h. Finally, add the code to disconnect from the current server: i c e
disconnect() bl el
r a
fe following:
i. Save the file after making the changes. The edited file should look likesthe
t r a n
on -
a ฺ n
a s
h uide
)
i l ฺ com ent G
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 17
2. In a Terminal window, navigate to
/home/oracle/labs_SA/Practice_05/wlst/export and execute the
executeScripts.sh file to export the Service Bus configurations (the Practice_04
project) from the osb_domain to a JAR file.

3. Verify that Practice_05_sbconfig.jar is created in the current working directory.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Note: The solution script for exporting a Service Bus configuration is provided in the nse
i c e
/home/oracle/labs_SA/Solutions/wlst/export directory. In case you fail to
create the configuration file correctly, use the script provided with the solutions. bl el
Optionally, you can view the contents of the file by right-clicking f e r a
Practice_05_sbconfig.jar and selecting Open with "Archive Manager". Now you ans
can view the contents of the exported project. n - t r
a no
4. Modify a WLST script to import a Service Bus configuration h a s fileeinto
ฺ osb_domain. The
)
m t Gu
sample configuration file (which creates the Sample_OSB_Project)
i d is already provided
c o
lฺ adnew
with the script file. The script will also icreate
m a u ensession and finally activate the session.
g file in aStext t
a. Open the /home/oracle/labs_SA/Practice_05/wlst/import
/wlstScript_import.py @
rh ein tthe s
hi file. Youeditor. Add the appropriate code as instructed
o
at the appropriatef ulocation
s will see comments for where to add each line
of code. ( g u
a
Note:n o toyou can replace the wlstScript_import.py file in the
tAlternatively,
y
rr/home/oracle/labs_SA/Practice_05/wlst/import
H e directory with the already
fur edited wlstScript_import.py file from the
Go /home/oracle/labs_SA/Practice_05/Solutions/wlst/import directory. If
you do so, skip to Step 5 that follows.
b. This WLST script is already set up to import the appropriate classes needed for
importing a Service Bus configuration to a JAR file. It is also set up to connect initially
to the administration server in osb_domain.

c. Use the findService method to get SessionManagementMBean. Assign the


MBean to a variable that can be used later.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 18
sessionMBean = findService(SessionManagementMBean.NAME,
SessionManagementMBean.TYPE)
d. Use the MBean to create a new session called Import Session.
print '...Creating a new session...'
sessionMBean.createSession("ImportSession")
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

e. Use the findService method to obtain ALSBConfigurationMBean for the new


session. Append the name of the specific session to the MBean name.
alsbSession = findService(ALSBConfigurationMBean.NAME + "."
+
"ImportSession",ALSBConfigurationMBean.TYPE)
f. Use the uploadJarFile method of ALSBConfigurationMBean. Provide the
variable that holds the SB configuration as the argument to this method.
nse
alsbSession.uploadJarFile(bytes)
l i c e
g. Call the importUploaded method of ALSBConfigurationMBean. This method
b l e can
take an import plan as input, but because you do not have one, you can e
f rathe
use
keyword None instead.
a n s
- t r
alsbSession.importUploaded(None)
n on
h. Activate the session. Use the activateSession method
s a ofฺ
) a
ALSBSessionManagementMBean to activatehthe sessioneand apply the changes.
id
m u
print 'Activating the session...'
i l ฺ co ent G
m a tud
sessionMBean.activateSession("ImportSession", "Imported the
project.")
@ g S
h i s
o f ur se th
t o (g to u
y a n
er r
ur H
f
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 19
i. Save and close the file after making the changes. The edited portion of the file should
look like the following:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
5. In a Terminal window, navigategto ma Stud
r h@ this
/home/oracle/labs_SA/Practice_05/wlst/import
f u
and execute the
executeScripts.sh
( g e the Sample_OSB_Project project from the
o fileutosimport
t o
sample_sbconfig.jar
n t o file into osb_domain.

r r a solution script for importing a Service Bus configuration file is provided in the
Note:yThe
H e
/home/oracle/labs_SA/Practice_05/Solutions/wlst/import directory. In case
fur you fail to write the script correctly, use the script provided with the solutions.
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 20
6. Return to the Service Bus Console for osb_domain. Navigate to the Project Explorer and
confirm that the project, Sample_OSB_Project, exists.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
7. Delete Sample_OSB_Project from osb_domain.
ans
a. Click the Create button to start a new session.
n - t r
no
b. In Resources, select Sample_OSB_Project (ensure that nothing else is selected)
a
and click Delete.
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

c. Click Yes in the confirmation window.


d. Click Activate, enter a description, and then click the Activate button to activate the
changes.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 21
(Optional) Practice 5-4: Propagating a Service Bus Configuration
Overview
In this practice, you export a Service Bus configuration from the current domain and import it
into a new Service Bus domain called prod_domain. This is an example of moving from a
development environment to a testing or production environment.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

In this practice, you:


• Export a configuration file
• Import a configuration file

Tasks
1. Set up the practice environment.
a. In a Terminal window, execute the following command to create a new PROD1 prefix.
nse
i c e
el
$ cd /home/oracle/labs_SA/Practice_05/create_schema
$ ./create_schema.sh
r a bl
b. Create a new SB domain called prod_domain using the instructions s e 3-3.
infLesson
Use PROD1 for the schema, 7091 for the admin server port number,
t r n
a and 8091 for the
OSB managed server.
on -
2. Start the Administration Server and the Service Bus Managed
n
a Server in prod_domain.
a. Open a new Terminal window and navigate tohthe a s e ฺ
) u i d
com ent G
/u01/app/oracle/fmw_admin/12.1.3.0/user_projects/domains/prod_do
main/bin directory. i l ฺ
b. Start the Administration Server g maby executing
S tud the following command (all on one line):
$ gnome-terminal
f u rh@ t
-–title h is"ProdAdminServer" –e ./startWebLogic.sh
(
If prompted, g enter se
o theuadministrative credentials: weblogic/welcome1.
Note: t o t o
nThis command starts the server in a separate Terminal window with the
r y a
H er can also starttitleit using
appropriate so that you do not confuse it with other server Terminal windows. You
a separate terminal window with just the ./startWebLogic.sh
fur
Go
command.
It will take a couple of minutes to start up. Make sure you see the message "Server
started in RUNNING mode" to confirm that the Administration server is running.
c. Similarly, start the Service Bus Managed Server. From the
/u01/app/oracle/product/fmw/12.1.3.0/user_projects/domains/prod_
domain/bin directory, execute the following command:
$ gnome-terminal -–title "ProdServiceBusServer" –e
"./startManagedWebLogic.sh osb_server1"
When prompted, enter the administrative credentials: weblogic/ See
OracleServiceBus12cPassword File.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 22
Note: You can also start it using a separate terminal window with just the
./startManagedWebLogic.sh osb_server1 command.
It will take a couple of minutes to start. Make sure you see the message "Server
started in RUNNING mode" to confirm that the SB managed server is running.

3. Export the configuration file.


Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

a. In a web browser, navigate to the Service Bus Console for the original domain
(osb_domain) at http://localhost:7001/servicebus. Log in as weblogic/ See
OracleServiceBus12cPassword File.
b. Navigate to the Resources section of the Service Bus Console.
c. Select Practice_04.
d. Click the Export button.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
e. In the Export( o usdialog box, ensure that Practice_04 is selected and System
gResources
a n
is not t o
selected. to
e rry
fur H
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 23
f. Click Export and click OK to save the file. The file, named sbconfig.jar, will be
saved to your Downloads folder.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
ma Stud
4. Import the configuration file into prod_domain.
g
f u r @e thforisprod_domain
a. Start the Service BushConsole
http://localhost:7091/servicebus
by navigating to
in a web browser.
b. Log in aso ( go o us
a
c. Create
t
weblogic/welcome1.
nt a new session.
y
H errNavigate to the Resources section of the Service Bus Console.
d.
fur
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 24
e. Click the Import button.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

f. Browse to the location where you saved the Service Bus configuration JAR file,
sbconfig.jar, and open the file. Click Next.
nse
i c e
bl el
f e r a
ans
n - t r
a no
s eClick
g. Ensure that the Practice_04 configuration filehisaselected. ฺ Import.
)
m t Gu i d
c o
m ailฺ tuden
@ g S
h i s
o f ur se th
t o (g to u
y a n
er r
ur H
f
Go

h. Activate the session. Do not forget to add a description and click Activate.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 25
5. Validate the changes to prod_domain.
a. In the prod_domain Service Bus Console, navigate to Project Explorer.
b. Expand Practice_04 > Notification > Pipeline and click
ConfirmationEmailQueue_pipeline.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
c. In the Folder Definition@
pane, opens the Test Console for
r h t h i
g ofu use
ConfirmationEmailQueue_pipeline
( by clicking the test button.
d. In the Payload
a n to change CustomerID and OrderID to 3.
to section,
e rry
fur H
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 26
e. Execute the test to ensure that the proxy service is running as expected. There should
be no errors. However, no response is expected because this is a one-way service.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

f. Close the Test Console.

nse
6. Propagate a configuration change from one domain to the other.
i c e
a. Return to the Service Bus Console of osb_domain.
bl el
b. Create a new session.
f e r a
c. Navigate to Project Explorer. ans
d. Expand Practice_04 > Notification > Pipeline. Click the n - t r
ConfirmationEmailQueue_pipeline. a no
h a s eฺ> General tab.
e. On the Pipeline Definition section, click the Configuration
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 27
f. Supply a description for the pipeline proxy service, and then click the Save button.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

g. Click Activate and enter a description.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
h. Export the Practice_04 project. ilฺc
o nt G
a if tyou e
udneed
Hint: View the instructionsginm
step 3S a reminder.
@
rh e thi s
f u
o ( go o us
a
Note:
t file, named sbconfig(1).jar, is saved to the Downloads
ntThe configuration
y
H errfolder.
fur
Go 7. Verify that the changes to the service reflect successfully in prod_domain.
a. Return to the prod_domain Service Bus Console.
b. Create a session.
Note: You will be prompted to log in again so there is no confusion between the two
Service Bus Consoles.
c. Import the sbconfig(1).jar file.

d. Activate the session.


e. Confirm that the new description of the ConfirmationEmailQueue_pipeline
service is visible in prod_domain.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 28
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

f. Log out of the Service Bus Console for prod_domain and close the browser window.

8. Shut down the Administration Server and Service Bus Managed Server in prod_domain. e
a. Return to the Terminal windows that are executing the Administration Server and
c e ns
Service Bus Managed Servers for prod_domain (ProdAdminServer and Prod Service el i
Bus Server). a bl
f e r
Important: Ensure that you are not shutting down the osb_domain server.
ans
b. Enter the “Ctrl + C" key combination in each Terminal window to shut down the
n - t r
servers.
a no
h a s eฺ
c. Close the Terminal windows after the servers stop.

m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 29
Solution Instructions
The solution files contain the completed Practice 5-3 WLST scripts for you to execute and verify
the result of importing and exporting Service Bus configuration files by using the command-line
tool. There are no solutions for Practices 5-1 and 5-2, and Practice 5-4 is optional. These
practices are not required to be completed for any subsequent practices.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Assumptions
• The Practice_04 project is deployed on the Service Bus server (performed in
Practice 4-1).

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
Tasks f u rh@e this
( go o us
1. Navigate to /home/oracle/labs_SA/Practice_05/Solutions/wlst/export
o and
n t t
run theaexecuteScripts.sh file to export the Service Bus configuration file.
r y
er that the export file Practice_05_sbconfig.jar was created in
2. Verify
H
fur /home/oracle/labs_SA/Practice_05/wlst/export.
Go Optionally, you can view the contents of the file by right-clicking
Practice_05_sbconfig.jar and selecting Open with "Archive Manager." Now you
can view the contents of the exported project.
3. Navigate to /home/oracle/labs_SA/Practice_05/Solutions/wlst/import and
run the executeScripts.sh file to import the Service Bus configuration file.
4. Perform steps 6 and 7 in Practice 5-3 to verify that the new project was created and then to
delete the new project.

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

Practices for Lesson 5: Service Bus Management Fundamentals


Chapter 5 - Page 30
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
noLesson 6:
Practices for
a
) u id has and
Reporting eฺ Monitoring
m
o n6t G
cChapter
i l
a tudeฺ
g m S
h @ i s
o f ur se th
t o (g to u
rr y an
r He
fu
Go

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 1
Practices for Lesson 6: Overview
Practices Overview
In the practices for this lesson, you:
• Monitor the health of Service Bus services
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

• Define Service-Level Agreements


• Analyze Service Bus Reports

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 2
Practice 6-1: Monitoring Service Health
Overview
In this practice, you take advantage of the Dashboard found within the Service Bus and Fusion
Middleware Control Consoles. The Dashboards give you the ability to monitor the performance
and health of individual services and their operations or of the entire service bus. However, to
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

monitor a service, you must first configure Service Bus to collect statistics for it.
You will monitor the supplied OrderManagementService_proxy, which simply passes
incoming requests through to OrderManagementService that is deployed to the Service Bus
Domain.

Assumptions
• Oracle Service Bus 12c 12.1.3.0 is installed and is running for osb_domain.
• The web service applications used by the Service Bus services are deployed and nse
i c e
running on Oracle WebLogic server.
bl el
Tasks f e r a
1. Import the sample Service Bus project by using the Fusion Middleware Control Console. ans
n - t r
no
a. In Target Navigation, right-click SOA > servicebus(AdminServer) and select Import.
a
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

b. On the Import Resources page, click the Browse button that is next to Jar Source,
browse to /home/oracle/labs_SA/Practice_06, and open the sbconfig.jar
file. Click Next.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 3
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

c. Review the contents of the Jar file to be imported, and then click Finish.
nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go
d. Ensure that you see the message “The import was completed successfully.” Close the
window.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 4
e. Refresh the page , and then verify that the project is visible in the Target
Navigation.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
2. Configure monitoring for a proxy service.
i c e
a. First ensure that the Global Settings are enabled. In Enterprise Manager, select SOA >
bl el
servicebus(AdminService).
f e r a
b. Select the Global Settings tab, and verify that all options are selected.
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

c. In the Target Navigation, expand SOA > service-bus(AdminService) and select


Practice_06.
d. Click the Operations tab.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 5
e. Select the OrderManagementServicePipeline.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

f. Select the Properties tab.


g. Ensure that Monitoring is enabled, Monitoring Level is Pipeline, and Aggregation
nse
Interval is 3 min.
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
h. Click Apply.
m ) u id
i l ฺ co ent G
ma Stud
3. Launch the Test Console for OrderManagementServicePipeline.
g
f u rh@e this
o ( go o us
a nt t
y
err that Include Tracing is selected.
4.HEnsure
fur
Go

5. In the Test Console, execute two test cases for the getOrdersForCustomer operation
and the getOrderStatus operation each. Test both the operations, once with valid data
and once with invalid data. This generates statistics that you will view later.
a. Test the getOrdersForCustomer operation with valid parameters. Select
getOrdersForCustomer from the Available Operations drop-down list at the top,
and then enter the following payload values:
<java:FirstName>: Tom
<java:Id>: 1001
<java:LastName>: Harkey
Click Execute.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 6
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

b. Click Back.
c. Test the getOrdersForCustomer operation again with invalid parameters. Enter the
following payload values:
<java:FirstName>: No
nse
<java:Id>: 99
i c e
<java:LastName>: Body
bl el
Click Execute. You will see an error message in the Response Document, such as
f e r a
“The invocation resulted in an error.”
ans
d. Click Back.
n - t r
e. no
Test the getOrderStatus operation with a valid parameter. Select
a
h a s eฺ
getOrderStatus from the Available Operations drop-down list, and then enter the
following payload value:
m ) u id
<ser:orderId>: 1001
i l ฺ co ent G
Click Execute.
g ma Stud
f. Click Back.
f u rh@e operation
t his again with invalid parameters. Enter the
o ( go value:
g. Test the getOrderStatus
following payload o u s
a nt t 99
y
<ser:orderId>:

H errClick Execute. You will see an error message in the Response Document, such as
fur “The invocation resulted in an error.”
Go h. Close the Test Console.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 7
6. Monitor the service statistics.
a. In the Enterprise Console Target Navigation, right-click service-bus(AdminServer)
and select Home > Service Health.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

b. Click Search for a list of Services.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent Gin the table under Services.
mathe Service
c. Click the OrderManagementServicePipeline
d. Record the following data g from S tudMetrics table. You will find the Failure Ratio
@ hsection:
rhServices
by clicking within the is
f u
o use t
o ( g
Field
o Value

a t
n Overall Avg.t
r y
H er Response Time

fur Message Count


Go Error Count
Failure Ratio
e. If no data is available, the three-minute aggregation interval may have already elapsed.
Run the client application test and switch to Since Last Reset in the Search section.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 8
Practice 6-2: Defining Service-Level Agreements
Overview
In this practice, you configure Service-Level Agreements (SLAs) on an existing proxy service.
An SLA triggers alerts when their conditions have been met. The OrderManagementService
SLA tracks the number of errors that occur and also the service’s response time. For the
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

purposes of this practice, alerts from either SLA will be delivered to a JMS destination that is
deployed to Service Bus Domain (although typically the destination would be some centralized
operations center).
In this practice, you:
• Configure a JMS alert destination
• Assign an SLA to a proxy service
• Monitor alerts triggered from an SLA e
c e ns
Tasks
el i
1. Create a JMS Connection Factory and Queue and log their JNDI names. a bl
f e r
a. Open a Terminal window and navigate to the
ans
/home/oracle/labs_SA/Practice_06/resources directory.
n - t r
b. no
Execute the create_jms.sh script to create a JMS Connection Factory and JMS
a
h a s eฺ
Queue within the osb_domain domain. You will see the following message if the script
is executed successfully.
m ) u id
i l ฺ co ent G
g ma Stud
c. Launch the WebLogic
f u r h@
Server h
t is
Administration Console for the osb_domain domain

File) o ( go o use using the (See OracleServiceBus12cPassword


(http://localhost:7001/console)
credentials.
a nt t
y
H err
fur
Go

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 9
d. Confirm that AlertQueue and AlertConnectionFactory were successfully
deployed by navigating to Services > Messaging > JMS Modules and clicking
jmsResources in the JMS Modules table.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
e. Record the JNDI names
r h @of thehfollowing
i s resources:
Resourceofu t
e JNDI Name
( g
AlertQueue o u s
a n to t
y
H err AlertConnectionFactory
fur
Go 2. Configure SLA Alerts for the OrderManagementService_proxy Proxy Service.
a. In the Fusion Middleware Control Console Target Navigation section, expand SOA >
Service Bus > Practice_06.
b. Click the Operations tab.
c. Select the options to enable SLA Alerts and Pipeline Alerts. Make sure the
Aggregation Interval is set to 3 minutes, and then click Apply.

d. Click the OrderManagementService_proxy.


e. Select the Properties tab.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 10
f. Select the Enabled check box for Monitoring and SLA Alerting. Make sure the
Aggregation interval is set to 3 Mins.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
g. Click Apply.
f u rh@e this
o ( goconsole,
o u s
a n t
3. In the Service Bus t create a JMS alert destination.
y a new Service Bus session.
a. rCreate
r
e
ur H
b. In the Resources tab, right-click the Practice_06 project and select Create > Folder.
f
Go c. In the Create a New Folder Resource Name field, enter Alerts. Click Create.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 11
d. Right-click the Alerts folder and select Create > Alert Destination.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
m a tud
g
e. In the Create Alert Destination
@ dialog, S enter JMSAlertDestination for Resource
h i s
Name.
o f ur se th
t o (g to u
f. Click Create.

y
g. rIn a n
the Alert Destination Definition > JMS Destination section, click the Add button
H er to add the JMS Destination.
fur h. Using the JMS JNDI names recorded earlier, enter the full Destination URI. Recall that
Go a JMS URL is of the form
jms://<host>:<port>/<ConnectionFactoryJndiName>/<QueueJndiName>
Hint: Use Localhost for <host> and 7003 for <port>. Use the JNDI name
recorded earlier for the AlertQueue and AlertConnectionFactory options.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 12
i. For Message Type, select Text.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
j. no
Click OK. Your Alert Destination page should look like the following:
a
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
k. Click the Save button.
l. Activate theg
( o and
session
u sinclude a description.
nt o t o
y a
rr an SLA rule based on error count.
4. Define
H e
fur a. Create a new session.
Go b. In Resources, click Practice_06 > Proxy Service, and then click
OrderManagementService_proxy.
c. Click the SLA Alert Rules tab.

d. Click the Add button.


e. In the Create SLA Alert Rule dialog box, enter or select the following information:
Field Value
Name Order Error Count
Rule Description Trigger an alert when at least 2 errors occur
Summary OrderManagementService error count SLA
violated
Severity Critical
f. For Alert Destination, click the Search button, select JMSAlertDestination, and
then click Next.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 13
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

g. Set the Condition Aggregation Interval for this SLA to 3 minutes.

h. Click the Add button to add open the Condition Builder.


nse
i. In the Condition Builder, enter the following: i c e
bl el
f e r a
ans
j. Click the Update Condition button.
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go k. Click Create, and then click the Save button to save the new SLA.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 14
5. Define an SLA rule based on response time.
a. Make sure the pipeline monitoring level is set to Pipeline level. You can verify this by
clicking the Operations tab in Enterprise Manager.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

b. Click the SLA Alert Rules tab in the Service Bus console.

c. Click the Add button .


d. Enter or select the following information: nse
i c e
Field
Name
Value
bl el
Order Response Time
f e r a
Rule Description Trigger an alert when response time is greater than
ans
1ms
n - t r
Summary no
OrderManagementService response time SLA
a
violated
h a s eฺ
Severity Major m ) u id
e. i l ฺ co ent G
Set the Alert Destination to JMSAlertDestination (as you did before in step 4f.)
f. Click Next. g ma Stud
f u
g. Click the Add button rh@toeadd
t s
hiopen the Condition Builder.
( g o u s
h. In the Condition Builder, enter the following:
a n to to
e rry
fur H Note: The aggregation interval should be 3, which is the same for the service
Go monitoring and SLA alerts.
i. Click Create.

j. Click the Save button to complete the SLA Alert.


k. Activate your changes, enter a description, and click Create.

6. Test the SLA alerts.


a. Launch the test console for OrderManagementService_proxy.
b. Under Available Operations, select getOrderStatus.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 15
c. In the Payload field, locate the <ser:orderID> element. Set its value to 99.
This causes the service to return an error because the supplied ID is invalid.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
d. Click Execute. h a s eฺ
e. Repeat the previous steps to generate am
) u id
f. Execute a third test using a correct i l ฺ coof 1001.
ID e n tG
second error.
a tud
g. Close the Test Console. gm S
h @ i s
o f uther dashboard
s e th
o g ou
7. View the alerts(using in the Fusion Middleware Control Console.
a. Under
a t
ntTarget Navigation, click service-bus (AdminServer).
y
b. rrClick Dashboard, and then the SLA Alerts tab, if it is not already visible. If you do not
H e see the SLA Alerts, click Refresh on your browser.
fu r
Go Note: You might have to wait for up to 3 minutes for this to display. If you still cannot
see the alerts, double-check your configuration settings. Did you set the aggregation
interval for your Alert Rule to 3 minutes, or is it still set to the default of 10 minutes?

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 16
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
Note: If your response time is very fast, you may not see a major alert for Order bl el
Response Time. f e r a
c. Click an area of the pie chart to filter the alerts being displayed. ans
n - t r
d.
no
Locate the Alert Name column. Click one of the alerts to view its details.
a
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 17
Practice 6-3: Analyzing Service Bus Reports
Overview
In this practice, you use OrderManagementService_proxy to generate and view sample
Service Bus reports. The Proxy Service extracts the order status information of any given order,
and generates a report. These reports give relevant information when tracking order processing.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

In this practice, you:


• Use a proxy service to trigger reports
• View reports using the Service Bus console

Tasks
1. Enable the OrderManagementServicePipeline report option.
a. In Enterprise Manager Target Navigation section, click Practice_06.
nse
b. Click the Operations tab. i c e
c. Select to enable the Reports option for the Pipeline. bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
d. Click Apply.
g ma Stud
f u rh@
2. In the Service Bus console, t
inspecth is
the report action in the Proxy Service Pipeline’s
Message Flow.(go u se
a. Clicknthe
a to Flow icon for OrderManagementServicePipeline.
toView Message
e rry
fur H
Go

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 18
b. Click the getOrderStatus operational branch for which the reporting action is
configured.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
c. no
Click the RouteTo_getOrderStatus node and select View Route.
a
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go
d. Click the Report action in the message flow. It extracts the order status information
from the service’s response. Note that this action executes an XPath expression to
construct the body of the custom report:

Note: You can also create an XSLT transformation to extract data into a report.
Similarly, the key name specifies the order ID.
e. Click Close.

3. Test the proxy service.


a. Launch the test console for OrderManagementService_proxy.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 19
b. In the Payload field, locate the <ser:orderID> element. Set its value to 1001, and
click Execute.
c. Repeat the previous step with the 1002 value.
d. Close the Test Console.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

4. View the reports from the Fusion Middleware Control Console.


a. In Target Navigation, right-click service-bus(AdminServer) and select Message
Reports.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
@default
rhthe
Search reports using h issetting All Dates.
f u
o use t
( g
a n to to
y
Herr
r
G ofu b. Click a Report Index to view a report’s contents.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 20
c. Scroll down and select the View Report Details option.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
d. Viewa nthe t of the report.
t custom body
y
H err
fur
Go

e. Click OK to close the report details.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 21
Solution Instructions
If you could not complete any of the practices successfully or you did not have the time to
perform them, follow these instructions to apply the solution for each practice.
To import a solution file in the Service Bus console:
a. Create a new session
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

b. Navigate to Resources > Import Resources


c. Browse to open the solution jar file
d. Click Next, and then Import
e. Click Activate and then Create to deploy your changes

Solution 6-1
1. Import the solution_6_1_sbconfig.jar configuration file located in the
/home/oracle/labs_SA/Practice_06/Solutions directory.
nse
i c e
el
Note: If you started the practice, you must delete the Practice_06 project in the Service Bus
l
console before importing the solution. If the project already exists in Service Bus, there
b
might be a conflict of resources.
s f era
2. Optionally, execute Tasks 3 to 6 of Practice 6-1 to test the proxy service
statistics. - t r anand monitor
n on
s a ฺ
Solution 6-2 ) a
h uide
1. Create a JMS Connection Factory and Queue,
i l ฺ comand
e n t Gtheir JNDI names.
log
a. Open a Terminal window and a tutodthe
mnavigate
@ g S directory.
h i s
/home/oracle/labs_SA/Practice_06/resources
f ur se thscript to create a JMS Connection Factory and JMS
b. Execute the create_jms.sh
o
t o (gthe tosb_domain
Queue within
o u domain. You will see the following message if the script

y a n
is executed successfully.
er r
ur H
f
Go 2. Import the solution_6_2_sbconfig.jar configuration file located in the
/home/oracle/labs_SA/Practice_06/Solutions directory.
Note: If you started the practice, or completed the previous practice, you must delete the
Practice_06 project in the Service Bus console before importing the solution. If the project
already exists in SB, there might be a conflict of resources.
3. Optionally, execute Tasks 6 and 7 of Practice 6-2 to test and view the alerts.

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 22
Solution 6-3
1. Import the solution_6_3_sbconfig.jar configuration file located in the
/home/oracle/labs_SA/Practice_06/Solutions directory.
Note: If you started the practice, or completed the previous practice, you must delete the
Practice_06 project in the Service Bus console before importing the solution. If the project
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

already exists in Service Bus, there might be a conflict of resources.


2. Optionally, execute Tasks 3 and 4 of Practice 6-3 to test the proxy service and view the
reports.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rry
r He
fu
Go

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 23
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 6: Reporting and Monitoring


Chapter 6 - Page 24
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
noLesson 7:
Practices for
a
) u id hasBus eSecurity
Service ฺ
m
o n7t G
cChapter
i l
a tudeฺ
g m S
h @ i s
o f ur se th
t o (g to u
rr y an
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 1
Practices for Lesson 7: Overview
Practices Overview
Pega Corporation virtualized its Credit Card validation service (Java EE Web service) by using
Oracle Service Bus to meet the increasing order processing demand. Pega Corporation has
already added several other credit validation providers in order to meet the increased demand.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Each credit validation provider has different authentication requirements. Pega Corporation
decided to use Oracle Service Bus to mediate security. Pega Corporation has standardized on
UserNameToken as the corporate authentication protocol.
CreditCardService_Proxy proxy service on Service Bus requires UserNameToken-based
authentication. To test the security implementation, you use the Service Bus Test Console. You
use the Test Console to provide credentials (username/password) to authenticate the
CreditCardService_Proxy proxy service. The identity of the authenticated user in Service Bus
will be propagated to the CreditCardValidationService web service by using SAML.
nse
After this practice is complete, the execution flow will look as follows: i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 2
In the practices for this lesson, you will perform the following:
• Configure and set up Oracle WSM and Oracle Service Bus security environment by
creating the identities.
• Configure and invoke a proxy service requiring User Name Token authentication.
• Propagate identity of the authenticated user from Oracle Service Bus to the web service
application by specifying a SAML Oracle WSM Service Policy.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 3
Practice 7-1: Configuring the Security Environment
Overview
In this practice, you configure Oracle WSM security by configuring the identities.

Assumptions
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

• Oracle Service Bus 12c 12.1.3.0 is installed and is running for the osb_domain.
• Oracle Web Services Manager is enabled and configured to work with Service Bus.
• CreditCardValidationService web service application is deployed and running on
Oracle WebLogic server.

Tasks
1. Create a user in WebLogic Server (WLS) by using Enterprise Manager. The Service Bus
nse
proxy service uses the WLS default authenticator to authenticate the username and
i c e
password in the WS-Security SOAP Headers received from the client. The user created
using Enterprise Manager is available to the WLS default authenticator. bl el
f e r a
a. In Enterprise Manager, right-click osb_domain and select Security > Users and
ans
Groups.
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 4
b. In the Users and Groups page, click Create.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
c. Create a user by specifying the following, and then click Create: i c e
User Name: joe bl el
New Password: See OracleServiceBus12cPassword File f e r a
ans
Confirm Password: See OracleServiceBus12cPassword File
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go
2. Add a csf-key for the user joe in Enterprise Manager. This step is required for the Service
Bus Test Console to look up the username and password using the csf-key.
a. In Enterprise Manager, expand WebLogic Domain, and click osb_domain.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 5
b. In the osb_domain page, from the WebLogic Domain drop-down menu, click Security
> Credentials.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
a
c. Click
t Map.t
nCreate
y
H err
fur
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 6
d. Add the following name: oracle.wsm.security and click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

e. Select the oracle.wsm.security map and click Create Key.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
e rrIny the Create Key page, specify the following options and then click OK.
f.
r H Map: oracle.wsm.security
fu
Go Key: joe-key
Type: Password
User Name: joe (same as entered in Service Bus Console)
Password: See OracleServiceBus12cPassword File (same as entered in
Service Bus Console)
Confirm Password: See OracleServiceBus12cPassword File

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 7
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

ns e
You should see the message: “The credential key, joe-key, has been created.” l i c e
g. Expand oracle.wsm.security and you should see joe-key.
r a ble
n s fe
- t r a
n on
s a ฺ
) a
h uide
i l ฺ com ent G
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 8
Practice 7-2: Applying a Security Policy to Proxy Services
Overview
In this practice, you add oracle/wss_username_token_service_policy Oracle WSM policy, at run
time to the CreditCardService_Proxy proxy service by using the Service Bus Console.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Tasks
1. Import the sample Service Bus project by using the Service Bus console.
a. In Service Bus Console, create a new session.
b. In the Resources tab, click Import Config Jar.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m
c. On the Import Config Jar page, browse and )navigateutoid
i
/home/oracle/labs_SA/Practice_07 l ฺ n t G and open the sbconfig.jar
co edirectory,
file. Click Next.
g ma Stud
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 9
d. On the Import Config Jar > Input Configuration page, click Import.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
r h @ hindicating
e. You should see the message
i s the import was successful, and then click
Close. t
ofu usean appropriate description.
(
f. Activate the g
changes with
a n to to
y Name Token Service Oracle WSM policy to the proxy service.
rrUser
e
2. Add
fur Ha. Create a new session in Service Bus.
Go b. Expand Project Explorer, and click Practice_07 > Proxy Service.
c. On the Proxy Service page, click CreditCardService_Proxy.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 10
d. On the Proxy Service Definition page, click the Security tab.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
e. Under the Security tab, select From OWSM Policy Store, and then click Attach
f e r a
Policies.
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu f. In the Security Policies – CreditCardService_Proxy dialog box, enter
Go oracle/wss_username_token_service_policy in the Name field, and then click
Search.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 11
g. Select oracle/wss_username_token_service_policy, and then click Attach.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
h. Verify that the policy is attached, and then click OK.
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
i. Savea t changest and Activate the session with an appropriate description.
nthe
y
H err
fur
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 12
Practice 7-3: Testing the Proxy Service Security Implementation
Overview
In this practice, you perform a positive test and a negative test to confirm the Oracle WSM
security (User Name Token policy) implementation on the proxy service by using the Service
Bus Test Console.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Assumptions
• The Oracle WSM security environment is configured to protect Service Bus services.
• Respective Oracle WSM key is defined.
• Respective user identities are created in Oracle WebLogic Server.
• The Service Bus proxy service is secured with the
oracle/wss_username_token_service_policy Oracle WSM policy.
nse
i c e
Tasks
bl el
1. Perform a positive test to verify that the proxy service is securely invoked successfully.
f e r a
a. In Service Bus Console, navigate to the Practice_07 > Proxy Service folder.
ans
b. Click the green arrow button in the Actions section to launch the Test Console for the n - t r
CreditCardService_Proxy proxy service.
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
e r ry
r Hc. In the Test Console, enter values in the Payload field. Specify the card number as
fu 1234-1234-1234-1234 and the card type as AMEX as shown in the screenshot
Go below.
Because the CreditCardService_Proxy proxy service is attached with the User Name
Token Oracle WSM policy, you notice a Security section in the Test Console with an
oracle/wss_username_token_client_policy policy name and with a csf-key property.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 13
d. In the Test section, specify joe-key as the override value. The username and
password have already been created, and a mapping joe-key csf-key with the same
credentials has already been created by using the OEM Console.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
e. Clicka t
nExecute t
to test the proxy service.
r y
f.er You should see the following response (in addition to SOAP headers).
ur H
f
Go

g. Close the Test Console.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 14
2. Perform a negative test by modifying the password of user joe to a different value, and
then invoking the proxy service.
a. In Enterprise Manager, right-click osb_domain and select Security > Users and
Groups.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 15
b. On the Users and Groups page, click joe.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
c. On the “Settings for User: joe” page, click the Passwords tab.
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 16
d. Modify the password to (See OracleServiceBus12cPassword File), and then
click Save.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
e. Execute the same test case (the one you performed for the positive test) r a
feusing the
n s
because joe’s password does not match the value used in n the- ra response,
Service Bus Test Console. You see the request fail with the following
tCredential Map.
n o
s a ฺ
) a
h uide
i l ฺ com ent G
g ma Stud
f u rh@e this
o ( go o us
a
3. Reset the
t
npassword t
of user joe back to (See OraScleServiceBus12cPassword
y
H err
File).

fur
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 17
Practice 7-4: Propagating Identity from Service Bus to Secured Web
Service
Overview
In this practice, you propagate the identity of the user authenticated in Oracle Service Bus to the
web service application. As a part of this practice, you perform the following steps:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

• Protect the CreditCardValidationService Java EE web service application deployed to


the WebLogic Server by using the oracle/wss10_saml_token_service_policy service
Oracle WSM policy.
• Update and attach the CreditCardService business service in Oracle Service Bus with
the oracle/wss10_saml_token_client_policy client Oracle WSM policy.
• Test the security implementation.

Assumptions ns e
l i c e
• The CreditCardService_Proxy proxy service is secured with the User Name Token e
b l
Oracle WSM policy.
s f era
• The password of user joe is reinstated to See OracleServiceBus12cPassword
File. - t r an
n on
Tasks s a ฺ
) a
h uide
1. Add a SAML service Oracle WSM policy to the CreditCardValidationService web
service application. m
co ent G
i l ฺ
a tud Manager, expand WebLogic Domain >
a. In the Target Navigation panel of Enterprise
g m
osb_domain and click AdminServer. S
h @ i s
o f ur se th
t o (g to u
y a n
er r
H
fur
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 18
b. On the AdminServer page, from the WebLogic Server drop-down menu, click Web
Services.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
ma Stud
c. On the Web Services page, click CreditCardValidationPort.
g
f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 19
d. On the Web Service Endpoint page, select WSM Policies tab, and click
Attach/Detach.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 20
e. On the Attach/Detach Policies page, select
oracle/wss10_saml_token_service_policy and click Attach.
Note: You need to filter by entering the policy name or scroll down to select this policy.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 21
f. On the Attach/Detach Policies page, verify that the policy is attached and click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 22
g. You should see the policy information attached to the service.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

2. Test the security implementation by invoking the CreditCardValidationService web


service from the Service Bus service without implementing the appropriate OWSM client-
side policy.
a. In Service Bus Console, navigate to the Projects > Practice_07 > Pipeline page.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 23
b. Click the green arrow button in the Actions section to launch the Test Console for the
CreditCardServicePipeline.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

c. In the Test Console, enter values in the Payload field. Specify the card number as
1234-1234-1234-1234 and the card type as AMEX as shown in the screenshot
below. Make sure the “Include Tracing” option is selected. nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

d. Click Execute to test the pipeline.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 24
e. You should see the following invalid security message in the Invocation Trace section.
This indicates that the Service Bus service didn’t have the required security
infrastructure to invoke the secured web service application.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
f. Close the Test Console.
i l ฺ co ent G
m a tud
3. Add a SAML client Oracle WSM
@ g policy toSthe CreditCardService business service.
u h
r create
t h is
f
a. In Service Bus Console, a new session.
o us>eBusiness Service and click CreditCardService.
b. Navigate to(g
Practice_07
a n to to
e rry
fur H
Go

c. On the Business Service Definition page, click the Security tab.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 25
d. Select From OWSM Policy Store, and click Attach Policies.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

e. Under Available Policies, enter oracle/wss10_saml_token_client_policy in


the Name field, and click the search icon.

nse
i c e
bl el
f e r a
ans
n - t r
f.
no
In the results table, select oracle/wss10_saml_token_client_policy and click
Attach. a
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 26
g. In the Directly Attached Policies panel, verify that the policy is attached and click OK.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
el
h. Save and activate the changes with an appropriate description.
a bl
f e r
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
4. Test the security implementation.

f u rh@toethethPractice_07
a. In SB Console, navigate is > Proxy Service page.

o ( go o us
a nt t
y
H err
fur
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 27
b. Click the green arrow button to launch the Test Console for the
CreditCardService_Proxy proxy service.
c. In the Test Console, enter values in the Payload field. Specify the card number as
1234-1234-1234-1234 and the card type as AMEX as shown in the screenshot
below. In the Security section, specify joe-key as the override value for the
oracle/wss_username_token_client_policy policy with the csf-key property.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go
d. Click Execute to test the proxy service.

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 28
e. You should see the following response (in addition to SOAP headers). This indicates
that the service was successfully invoked by using SAML identity propagation.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

f. Close the Test Console.


nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 29
Solution Instructions
Assumptions
The solution file only contains the Service Bus security configurations. It does not contain
configurations to secure the CreditCardValidationService Java EE web service application.
Therefore, the solution file depends on:
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

• Successful completion of Practice 7-1


• Successful completion of Task 1 of Practice 7-4 – Add a SAML service Oracle WSM
policy to the CreditCardValidationService Web service application

Tasks
1. In the Service Bus console, import the configuration file, solution_7_sbconfig.jar,
provided in the /home/oracle/labs_SA/Practice_07/Solutions directory.
Note: If you already partially completed the practices and created the Practice_07 project, nse
i c e
then you must delete the existing Practice_07 project from the Service Bus Console before
importing the solution file. bl el
f e r a
2. Execute Task 4 of Practice 7-4 to test the security implementation.
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 7: Service Bus Security


Chapter 7 - Page 30
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
noLesson 8:
Practices for
a
) u id hasBus eHigh
Service ฺ Availability
m
o n8t G
cChapter
i l
a tudeฺ
g m S
h @ i s
o f ur se th
t o (g to u
rr y an
r He
fu
Go

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 1
Practices for Lesson 8: Overview
Practices Overview
Pega Corporation virtualized most of its back-end services (Java EE web service) by using
Oracle Service Bus to meet the increasing order processing demand. It needs to create
provisions for handling the large traffic on the services, and also to minimize the service down
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

time.
Service Bus is a proven, lightweight SOA integration platform, designed for connecting,
mediating, and managing interactions between heterogeneous backend services, messaging
services, and legacy endpoints. The purpose of this practice is to provide the detailed steps of
architecting and implementing Service Bus for high availability that is critical for a mission-
critical production deployment.
In this practice, you create a new Service Bus domain (ServiceBusClusterDomain) that consists
of an administrative server and two clustered managed servers. You then test the load
nse
balancing and failover capabilities. The backend service application i c e
(CreditCardValidationService) is deployed on to the services domain. For simplicity of the
bl el
practice, you use the osb_domain as the services domain. You can view the architecture as
f e r a
follows:
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 2
Practice 8-1: Creating a Service Bus Cluster
Overview
In this practice, you run the RCU script to create a new schema, and then you use the Oracle
Fusion Middleware Configuration Wizard to create a Service Bus domain and configure a
Service Bus cluster.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Tasks
1. Navigate to the Practice_08 folder and run the script to create a new schema PROD2.
Open a Terminal window, navigate to the
/home/oracle/labs_SA/Practice_08/create_schema directory. Enter the
following command to run the RCU utility:
$ ./create_schema.sh
nse
2. Start the Oracle Fusion Middleware Configuration Wizard by entering the following
i c e
commands in a Terminal window:
bl el
$ cd /u01/app/oracle/fmw_admin/12.1.3.0/oracle_common/
f e r a
common/bin
ans
$ ./config.sh
n - t r
3. no
In the Domain Location field, leave the directory the same except replace base_domain
a
with ServiceBusClusterDomain_domain.
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rry
r He
fu
Go

4. Click Next.

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 3
5. Choose the templates.
a. Select Create Domain Using Product Templates.
b. Check the following available templates:
− Oracle Service Bus – 12.1.3.0 [osb]
− WebLogic Advanced Web Services for JAX-RPC Extension – 12.1.3.0
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

[oracle_common]
− ODSIXQuery 2004 Components – 12.1.3.0 [oracle_common]
− Oracle Enterprise Manager – 12.1.3.0 [em]
− Oracle WSM Policy Manager – 12.1.3.0 [oracle_common]
− Oracle JRF – 12.1.3.0 [oracle_common]
− WebLogic Coherence Cluster Extension – 12.1.3.0 [wlserver]
c. Click Next.
nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rry
r He
fu
Go

6. In the Application Location screen, verify the domain name and location.
Domain name: ServiceBusClusterDomain_domain
Domain location:
/u01/app/oracle/fmw_admin/12.1.3.0/user_projects/domains
Application location:
/u01/app/oracle/fmw_admin/12.1.3.0/user_projects/applications/Servi
ceBusClusterDomain_domain

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 4
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
7. Click Next.
bl el
8. Configure the Administrator username and password using the following settings:
f e r a
Name: weblogic ans
Password: See OracleServiceBus12cPassword File (enter twice to confirm) n - t r
9. Click Next. a no
h a s eฺ
JDK, and then click Next. m u id
10. Select Production for Domain Mode and Oracle HotSpot 1.7.0_71/usr/java/jdk1.7.0_71 for
)
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rry
r He
fu
Go

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 5
11. Enter the following settings for the Database Configuration Type:
Vendor: Oracle
Driver: *Oracle’s Driver (Thin) for Service connections; Version
9.0.1 and later
DBMS/Service: orcl
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Host Name: localhost


Port: 1521
Schema Owner: PROD2_STB
Schema Password: See OracleServiceBus12cPassword File
Note: The Schema Owners in this table must match the value that you assigned to schema
owners earlier when you ran the RCU utility. Do not leave it at the default with the DEV
prefix because that is used for a different course.
12. Click the Get RCU Configuration button to test the connection. nse
i c e
13. After the test is successfully completed, click Next.
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

14. Click Next after the JDBC Test is complete. If there are connection errors, click the Back
button to make the appropriate correction.
15. Click Next in the Component Data Sources page.

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 6
16. Select the following Advanced Configuration options:
• Administration Server
• Managed Servers, Clusters and Coherence
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rr y
r He
fu
Go

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 7
17. Configure the Administration server.
• Listen Address: localhost
• Listen Port: 7071
• Server Groups: Unspecified
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go oServers
u s using the following settings, and then click Next when
18. Configure the
a nt
completed.
Managedt
y
err Do not delete the existing osb_server1 before creating these two managed servers;
Caution:
H
furinstead, simply rename the first server Node1, and then add the second server, Node2.
Go Add a managed server:
Name: Node1
Listen Address: 127.0.0.1
Listen Port: 7072
Server Groups: OSB-MGD-Servers-Combined
Add a second managed server:
Name: Node2
Listen Address: 127.0.0.1
Listen Port: 7073
Server Groups: OSB-MGD-Servers-Combined

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 8
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

19. Configure the cluster name as ServiceBusCluster and leave the other fields blank. Click
Next.

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ n t Gand then click Next.
coright earrow,
g ma Stud
20. Assign servers to the clusters by using the

f u rh@e this
o ( go o us
a nt t
y
H err
fur
Go

21. Keep the default settings in the Coherence Clusters screen, and then click Next.
22. Click Next in the Machine Configuration screen.

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 9
23. Click Create to start the Configuration.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

nse
i c e
bl el
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
m a ensure
24. Review the final Configuration screen to
t u d the cluster was created.
25. Click Finish and close the @ g window.
terminal S
h i s
o f ur se th
t o (g to u
y a n
er r
ur H
f
Go

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 10
Practice 8-2: Initializing a Service Bus Cluster
Overview
In this practice, you start and initialize a clustered Service Bus domain. Then you test failover of
the cluster.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

Tasks
1. Start the Service Bus cluster in the ServiceBusClusterDomain_domain.
a. Open a new Terminal window and navigate to the
/u01/app/oracle/fmw_admin/12.1.3.0/user_projects/domains/Service
BusClusterDomain_domain/bin directory.
b. Start the Administration server by executing the following command in the Terminal
window:
nse
$ gnome-terminal -–title "Cluster AdminServer" –e
i c e
./startWebLogic.sh
bl el
When you are prompted, enter the administrative credentials of the
f e r a
ServiceBusClusterDomain_domain as weblogic/ See
ans
OracleServiceBus12cPassword File.
n - t r
a no
Note: This command starts the server in a separate Terminal window with the
appropriate title so you do not confuse it with the osb_domain server. You can also
h a s eฺ
m ) u id
start it using a separate Terminal window with just the ./startWebLogic.sh
command.
i l ฺ co ent G
ma Stud
Wait for the AdminServer to start up before starting the managed servers. The
g
managed servers will take a few minutes each to start up.
c. rh@e this
Similarly, start the clustered managed servers by executing the following commands in
f u
o
boot-up.( go o us
the Terminal window. Enter the credentials weblogic/welcome1 at the time of server

ant t
$y gnome-terminal
e rrNode1" -–title "Node1" –e "./startManagedWebLogic.sh

r H
fu $ gnome-terminal -–title "Node2" –e "./startManagedWebLogic.sh
Go Node2"

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 11
2. Initialize the cluster Service Bus configuration.
a. Load a Service Bus project in the ServiceBusClusterDomain_domain domain.
1) Start the Service Bus Console (http://localhost:7071/servicebus) for the
ServiceBusClusterDomain_domain, and log in as (See
OracleServiceBus12cPassword File).
2) Create a new session.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

3) In the Resources section, click the Import Config Jar icon.


4) In the Import Config Jar page, browse to
/home/oracle/labs_SA/Practice_08, and open sbconfig.jar file. Click
Next.
5) On the Import Resources - Project JAR File page, click Import. Close the dialog
box.
6) Activate the session with the applicable comments.
nse
i c e
3. Test the ValidateCredit Proxy Service.
bl el
a. Start the Test Console for Projects > Practice_08 > Proxy_Service > ValidateCredit.
f e r a
ans
n - t r
a no
h a s eฺ
m ) u id
i l ฺ co ent G
g ma Stud
f u rh@e this
o ( go o us
ant t
rry
r He
fu
Go

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

Practices for Lesson 8: Service Bus High Availability


Chapter 8 - Page 12
b. In the Test Console, replace the <arg0> value with 1234-1234-1234-1234 and
click Execute.
Unauthorized reproduction or distribution prohibitedฺ Copyright© 2018, Oracle and/or its affiliatesฺ

You should see the following response indicating a valid card.

nse
i c e
bl el
f e r a
ans
c. Close the Test Console.
n - t r
a no
4. Test the failover capability of Service Bus in a Services
Bus cluster.
a. Shut down the Node2 managed server by pressing ) h a theid
eฺ