Professional Documents
Culture Documents
(pn)Part V
(pt)Appendices
(cn)Appendix C
This appendix provides you with detailed instructions for the configuration of some of
these interactions and mechanisms. It helps you to get started with the JMS Adapter and the
Database Adapter, as well as configuring the UMS for sending emails.
Note: these instructions are created for SOA Suite 11gR1 Patch Set 3 and 4 (11.1.1.4 and
11.1.1.5), although they will largely apply to previous patch sets as well.
For this installation to succeed, you first of all need to make an Oracle RDBMS available,
could be 10g XE or 11g R1 or R2 EE. Run the Repository Configuration Utility (rcu) against
this database to create the database schemas and objects required for the run time
environment for SOA Suite and BPM.
C-1
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
2. Install the local development environment, consisting of JDeveloper 11g R1 (PS3) with the
SOA Composite Editor and BPM Studio extensions.
4. The Human Workflow services work out of the box with the users defined in this default identity store.
However, you can of course plug in a production quality LDAP server.
For now, let’s create user Maggie as the person to take on all high priority appointment assessments for the
time being. Open the WebLogic console, click on Security Realms in the Domain Structure tree.
C-2
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
5. Click on myrealm in the Summary window. The click on the Users and Groups tab. The list of current users –
which should at least contain the weblogic user – is presented.
C-3
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
Enter details for Maggie, at least her username and password. Click on OK.
C-4
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
You could create additional users, such as frank (a colleague of maggie) and the
appointmentmanager.
SoapUI
For testing the SOA Composite applications - reusing test cases over and over again - and
quickly establishing that all required services are indeed available, it is imperative that
SoapUI is installed. This simple, next-next-finish install can be done after downloading the
SoapUI software from: http://www.soapui.org/. No additional configuration is required.
C-5
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
easy to install and configure and has a small footprint and runtime overhead. It provides all
functionality we need.
2. Extract the contents of the zip file to some directory, for example C:\Program
Files\JavaMailServer.
domains=mydomain.com,stmatthews.com
user.maggie@stmatthews.com=maggiemaggie
user.frank@stmatthews.com=frankfrank
user.appointmentmanager@stmatthews.com=adminadmin
user.patientOne@mydomain.com=patientOne
user.patientTwo@mydomain.com=patientTwo
user.doctorBoris@mydomain.com=doctorBoris
5. Run the command script mail.bat (on Windows) or mail.sh (on Linux). This should start
the mail server. Check the file jes.log in the root directory of the JES. You can also check
the file user.conf: upon successful start up, all clear text passwords in this file will have
been replaced by encrypted counterparts.
C-6
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
7. Subsequently, start Thunderbird to create the necessary server settings and accounts.
8. The Account Settings editor appears. Select the node Outgoing Server. Click the Add button to add a
new SMTP Server.
C-7
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
9. Enter the details for our mail server: a description (a human readable label) and the server name
(probably localhost). The default port of 25 is okay. Click OK to create the SMTP server. Optionally click
on the Set Default button if you have multiple mail servers configured and this one is not [yet] the default
server.
Next you need to create a number of accounts for the users in and around St Matthews:
C-8
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Accept the default account type of Email Account and press Next.
C-9
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
Enter the display name for the account and the email address. This address must correspond with the value that
you have configured in the user,conf file for the Java Email Server. Press Next.
C-10
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Enter the incoming user name. This value must correspond with the value that you have configured in the
user,conf file for the Java Email Server.
C-11
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
Press Next.
Enter the account name. This value too should correspond with the value that you have configured in the
user,conf file for the Java Email Server.
C-12
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Press Next. The summary page appears. Press Finish to complete the account creation.
C-13
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
11. Repeat this same procedure for the other mail accounts that were configured in the user.conf file for the
Java EMail Server (but not the actionable.account@stmatthews.com).
The Thunderbird client shows all accounts that were just created:
C-14
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
12. To try out the configuration of both Java Email Server and Thunderbird, you could try to send an email
from Maggie to Frank:
after pressing send and waiting for some time (and perhaps pressing the Get Mail button once or twice) -
the email should arrive:
C-15
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
http://technology.amis.nl/blog/6019/configure-soa-suite-11g-for-sending-email-notifications-
with-google-mail for details on configuring notification in the SOA Suite 11g.
One of the ways of the SOA Suite 11g for communicating with the outside world – apart of course from
web service calls and interaction via technology adapters – is through the new User Messaging Service (UMS), a
facility installed in the SOA Domain during installation of the SOA Suite. The UMS enables two-way
communication between users (real people) and deployed applications. The communication can be via various
channels, including Email, Instant Messaging (IM or Chat), SMS and Voice. UMS is used from several components in
Fusion Middleware, for example BPEL, Human Workflow, BAM and WebCenter and can also be used from custom
developed applications.
The User Messaging Service comes with a number of drivers that each handle traffic for a specific channel.
One of the drivers controls the email channel. This driver needs to be configured with the properties of the
Google GMail Server and the email account from which emails are sent.
7. Go to the Oracle Enterprise Manager Fusion Middleware Control Console (typically http://host:7001/em) and
open the User Messaging Service node. From the drop down menu in the right hand pane, select the option
Email Driver Properties:
C-16
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
The form that is now shown allows you to set various properties on the Email Driver, including the
details about the email server to be used by the driver for email operations.
scroll down:
8. The properties that need to be configured for sending emails are indicated in the red
rectangle. They are:
OutgoingMailServer - localhost
OutgoingMailServerPort - 25
OutgoingMailServerSecurity - None
OutgoingDefaultFromAddress (optional) – the emailaddress that is indicated as the sender
of the email message (appointmentmanager@stmatthews.com)
C-17
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
OutgoingUsername – the user account from which the email is sent (can be left empty
when no security is used - otherwise appointmentmanager@stmatthews.com)
OutgoingPassword – (set type of password to Cleartext) the account‟s password (stored in
encrypted format) (can be left empty when no security is used - otherwise the password
from the user.conf file configured for the Java Email Server for user account
appointmentmanager@stmatthews.com)
Set these properties to the values that are appropriate for your environment.
9. To cater for incoming emails - responses to actionable emails - the following properties
should be set as well:
IncomingMailIDs - comma separated list of mail accounts that the SOA Suite
should poll for incoming messages. Set to actionable.account@stmatthews.com.
C-18
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
To have these settings take effect, the SOA Server has to be restarted. You can use the options Shutdown and
Start in the dropdown menu option Control to restart the managed server soa_server1. First you may want
to attend to the Workflow Notification properties:
11. We need to set the Workflow Notification Properties - to specify how the workflow should send its
notifications and how it should receive responses to actionable emails. Open option SOA Administration |
C-19
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
Workflow Notification Properties from the drop down menu on the soa-infra node on soa_server1:
12. The Workflow Notification Properties are shown. Only one is really important at this point: the Notification
Mode (default value is None) must be set to either All or Email, otherwise any notification is not really sent
onwards by the SOA Suite to UMS!
C-20
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Note: the Actionable Address is important when you want emails to be actionable - in other words: when
you want users to be able to send in responses (outcomes) to tasks by email. The account used to receive emails
that are in fact the (re)action by a user on a task should be specified here. No human agent should interfere with
this account.
13. Using the default myrealm security realm, we can go to the Web Logic Server console
(http://<host>:7001/console). Navigate to the Security Realms, select myrealm and go to the Users and Groups
tab. Click on user Maggie and navigate to the Attributes tab.
C-21
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
14. Locate the attribute mail and set it to the email address you have configured to receive notifications at (for
Maggie or the user in your environment). Activate the changes in the console using the button in the upper
left hand corner when so prompted.
When Maggie were to check her Preferences page in the worklist application, she would find that a
Business Email address has been added on the Notification tab. This entry is derived from the identity store – and
cannot be maintained in the worklist application.
Note: if you have other users defined in WebLogic's LDAP directory - like Frank or the
Appointmentmanager, you may want to set their email address attribute too.
The steps:
15. Run JDeveloper. Create a new SOA Composite application. Accept all defaults. Select the
template with a BPEL component. Again, accepts all defaults.
C-22
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
17. Drag an Email component to the BPEL process and drop it between receive and (callback)
invoke:
C-23
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
18. Double click the Email activity. Configure the activity's settings and provide some content
for the email:
20. Run the application through the test facility in the EM FMW console.
C-24
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
The DDL and DML statements that are required for these steps can be found in the file
PatientsDatabaseSetup.sql.
22. As a database user with DBA privileges - such as SYS or SYSTEM - create schema
patients_mgt using the statement in the sql-file (adapted to your specific environment). Also
grant the privileges as indicated in this file.
C-25
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
23. Connect to the database as the new user patients_mgt. Use the DDL statements in the file
PatientsDatabaseSetup.sql to create tables PATIENTS and MDP_DOC_APT_REQUESTS,
types PHYSICALCHARACTERISTIC, PHYSICALCHARACTERISTIC_TBL_T and
PATIENT_T. Finally create package PATIENT_DATA_SERVICES, both specification and
body.
24. Use the two insert statements in this file to create the first two patient records.
25. Now open JDeveloper and create a database connection to the patients_mgt schema.
Open the Resource Palette. Open the navigation panel with IDE Connections. Click on the
Database node (or the New icon at the top). Select New Database Connection in the menu.
Specify the connection name - Patients - and the configuration details for this database
connection:
C-26
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Test the connection and upon success, click OK to close the editor.
C-27
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
26. We can now inspect the objects in the Patients schema using the database [connection]
navigator options in JDeveloper. For example:
For each database schema that needs to be accessed through the Oracle database adapter, a new
instance needs to be created and configured with a data source. Data sources are a standard
J(2)EE resource, typically available in application servers. Each data source represents the
connections to a specific schema in some database. Each database adapter instance references
exactly one data source - one that connects to the database and schema required for the adapter
instance. The data source in turn can be used by many different consumers, including web
applications. A data source is associated with a connection pool, a collection of reusable JDBC
connections to the database. Applications reserve, use, and then return these connections to the
pool, thereby ensuring minimal resource usage and maximum scalability. The connection pool
C-28
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
and the connections within it are created when the connection pool is registered, usually when
starting up WebLogic Server or when deploying the data source to a new target.
The JCA configuration file that is created for a database adapter service in a SOA Composite
Application contains a reference to the JNDI name of a specific database adapter instance in the
WebLogic Server. In order for the application to run successfully, this adapter instance must
have been prepared by the administrator of this server. One could argue that a list of the required
adapter instances should be an explicit element in the deliverables handed from development to
the test and production environment.
After installing the SOA Suite 11g, there is already one database adapter instance configured. Its
JNDI name is eis/DB/SOADemo and it refers to a data source also created during the installation,
called SOADataSource with JNDI name jdbc/SOADataSource. This data source is configured to
connect to the SOAINFRA schema created by the Repository Creation Utility.
Illustration 1 - the relations between the Database Adapter instance and the Data Source
C-29
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
Our own SOA applications will most likely connect to other database schema in other databases
than the one provided by this SOADataSource. Therefore we need to create both a new data
source - connecting to the desired target schema and database - as well as a new database adapter
instance, associated with this new data source. We will refer to the JNDI name of the database
adapter instance in the configuration of the database adapter service in the composite application.
2. Click on the Data Sources node in the domain structure browser on the left side of the page,
under Services/JDBC.
C-30
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
3. The Data Source creation wizard is started. The first step lets you provide the values for
several identifying properties, such as the name of the data source and the JNDI name that is
used to locate the data source. Make sure the name starts with the jdbc/ prefix, for example
jdbc/PatientsDatabase. Accept the defaults for the database type and the Database Driver -
assuming of course that you will connect with an Oracle database.
Illustration 3 - First page in Data Source creation wizard for identification details
C-31
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
When you press the Next button, the second page provides some information about the
transaction support available with this data source. There are no choices to be made or
values to be provided.
When you press Next, the third page comes up. This is where you provide the database
connection details.
4. The same properties need to be provided as in the database connection editor in JDeveloper:
host, port and SID or database service name as well as username and password.
Illustration 4 - Page three in Data Source creation wizard for connection properties
5. The last page displays a summary of the details you provided. It also has a test button that
you can use to verify that a connection can be to the database schema, using these details.
C-32
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
After a successful test, click on Finish to conclude the wizard and have the data source
created.
The Summary of Data Sources page is shown. The new data source is listed along with the
preexisting ones.
6. Click on the newly created one. Inspect its details. Go to the tab labeled Targets. Here you
will find a list of the WebLogic servers in the SOA Domain. The checkboxes indicate
whether the data source is deployed on the server. Make sure that this checkbox is checked
for the soa_server1; if it is not, check the box and press the Save button.
C-33
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
7. Click on the node labeled Deployments in the domain structure browser. In the list of
deployed application that is shown, click on the DbAdapter deployment.
We are taken to the Settings for DbAdapter. Click on the Configuration tab and select the
Outbound Connection Pools within that tab. The currently configured adapter instances are
listed - you should see the preinstalled eis/DB/SOADemo instance we mentioned before.
C-34
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
9. Press the Next button. On the next page we have to specify the JNDI name for the database
adapter instance. This is the name we will configure in the database adapter services that we
C-35
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
Illustration 9 - Specify the JNDI name for the Outbound Connection (aka database adapter
instance)
10. The next page shown is the Save Deployment Plan assistant (this page is only shown the first
time you add a new database adapter instance). The definition of the new database adapter
instance needs to be saved in a deployment plan that is used to extend the configuration of
the DbAdapter deployment when next we restart the WebLogic server. Provide a valid path
and file name.
C-36
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Illustration 10 - Enter the name and location for the Database Adapter deployment plan
Then press Save. A success message should be shown, indicating that the deployment plan
has been created and prompting you to restart the DbAdapter deployment. However, before
we do that, we need to associate this new database adapter instance with the JDBC Data
Source jdbc/PatientsDatabase.
11. Click on the Configuration tab and subsequently on the Outbound Connection Pools child
tab. Expand the node javax.resource.cci.ConnectionFactory to show the list of database
adapter instances that should include the new eis/DB/patientsDatabase instance. Click on the
link for that instance. You are taken to the Outbound Connection Properties page. Click on
the cell for the xADataSourceName property in the Property Value column. An editable field
appears. Type the name of the JDBC data source that is to be used by this adapter instance.
Press enter to submit the name of the data source.
C-37
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
After the table has been refreshed with the new property value, press the Save button.
12. The DbAdapter deployment needs to be restarted for all changes to take effect. Go to the
Control tab. Check the box in front of DbAdapter and stop the deployment using one of the
options in the Stop dropdown shown just above the table. When the DbAdapter is stopped,
make it run again. During start up, the new deployment plan is fully activated.
Note: in my experience, changes are not always taking effect with just this update or restart
of the DbAdapter deployment. For example I frequently ran into the exception “Missing
Property Exception. Missing Property: [DBManagedConnectionFactory.userName].” In my
(local) development environment I tend to bounce the entire WebLogic Server, to be sure of
the application of my changes.
C-38
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
1. Open JDeveloper. Create a new SOA Composite Application. Accept all defaults. Select the
Empty Composite template.
2. Open the Composite editor - if it does not open by itself. Drag the Database Adapter to the
References area.
C-39
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
In the Service Connection dialog, click the icon to browse for the IDE Connection Patients to
the patients_mgt schema in the database. Select this connection and have it copied to the
application.
Take great care to enter the correct value for the JNDI name of the database adapter
(connection pool): eis/DB/patientsDatabase
C-40
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Press Next.
5. Click on the Import Tables button to select the Table to select data from. Select table
PATIENTS (the only table available). Click OK. Wait a little while. The name of the table
appears in the list of selected tables.
C-41
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
Click Next.
6. Click on Next until you can click on a Finish button. Accepts all defaults on all pages that
you go through.
7. Back in the composite editor, right click on the Exposed Services area. In the Insert list,
select the option Web Service.
The Create WebService dialog appears. Click on the browse for WSDL icon and select the
C-42
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
ReadPatients.wsdl that was created when you configured the outbound database adapter
service. Accept all defaults and press OK.
8. Wire the newly created Service1 inbound WebService binding to the ReadPatients database
adapter reference. The database adapter provides the implementation for the WebService.
Here we have the simplest application based on a database adapter I believe, exposing a
perfectly useful data retrieval service.
C-43
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
10. When deployment is complete, open the Enterprise Manager FMW console. Locate the
Project1 service - as the default name is likely to be.
11. Open the Test WebService window for this Project1 service. Press the Test Web Service
button and if the configuration of the Database Adapter and the Data Source is relies on is
correct, the records in the PATIENTS table in the patients_mgt schema show up in the
response:
C-44
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
When the expected response appears, we have proven that - beyond reasonable doubt - both
the Data Source and the Database Adapter Connection Pool have been set up correctly.
To prepare for the file system interaction, it is useful to prepare a number of directories.
13. Create a central directory for all files related to the composite applications of St Matthews,
for example d:\stmatthews or c:\temp\stmatthews on Windows or similar on Linux.
C-45
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
DentistAppointmentReqeuests - for the big file with all requests for dental
appointments, written by DentistsServiceCenter
C-46
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Set the Name for the new JMS Queue to financeNewPatientsQueue and its JNDI name to
jms/financeNewPatientsQueue; accept None for the template; press Next.
Select the SOASubDeployment on the next page and the SOAJMSServer from the list of
JMS Servers. Click on Finish
C-47
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
We now have defined the JMS queue that we can use later on to publish messages on.
Note that this queue is not SOA Suite specific; it is a generic JEE JMS Queue that any Java
application could use.
Return to the Summary of Resources table for the SOAJMSModule. Click on New to
create a new resource, this time of type Connection Factory. Enter a name of patientsJmsCF and
a JNDI name of jms/patientsJmsCF. Click on Finish to create the new resource.
(3)Testing the JMS ConnectionFactory and Queue from Java and the WLS Console
In JDeveloper, create a new project, in this case NewPatientsQueueClient. Add library
WebLogic 10.3 Remote Client – to bring the required JNDI and JMS classes, including
WLInitialContextFactory.
Create class JMSQueueHandler – to handle some of the basic plumbing of working with
JMS Queues. This class sets the JNDI properties, retrieves a ConnectionFactory and looks up the
JMS Queue [destination]. This super class contains the constants for the connection properties to
the WLS 10.3 server that hosts the JMS queues as well as the name of the connection factory
jms/patientsJmsCF.
C-48
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
desired custom properties as well. The main method in this class calls method publishMessage to
publish the JMS Message on the indicated JMS Queue.
The Monitoring page shows a table with all messages sent to and consumed from this
queue. Check the checkbox in front of the queue and click on the Show Messages button. You
will see a listing of the messages currently on the queue, including the one just sent by Java class
NewPatientsQueuePublisher. Click on that message to inspect message details. The JMS
Message Detail page shows the values of the standard header properties, custom header
properties and of course the message payload.
C-49
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
We will next implement the reverse procedure: consume a JMS message from the queue
and produce that message from the WebLogic Console.
Create a new Java Class in the same project - NewPatientsQueueClient - we used before.
Call the class NewPatientsQueueListener and have it extend from JMSQueueHandler. This class
should implement interface MessageListener. This interface defines a single method –
onMessage – that is invoked whenever a message appears on the JMS Queue(s) that this class is
registered for as a listener. The class has a method prepareToConsumeMessage. This method
acquires a JMS Connection from the connection factory initialized in the super class. It then
creates a session on the connection. It creates a consumer on the session, for the queue
financeNewPatientsQueue. The class itself is registered as the message listener for the consumer.
When the listener is in place, we can start the JMS Connection.
C-50
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
At this point, there is nothing left to do in the class, except sit back and relax – waiting
for messages to arrive. The one thing we need to make sure of is that the class „stays alive‟. The
main method contains a loop that listens for keyboard input – ensuring that the thread keeps
running until we press q[uit].
With the consumer set up, we can produce a message – either from the Java Class
NewPatientsQueuePublisher or from the WebLogic Console. In this case, we will do the latter.
Open the WebLogic Console. In the Domain Structure on the left side of the screen, click on
Services, Messaging, JMS Modules. Click on the SOAJMSModule in the table of JMS Modules.
Find the JMS Queue financeNewPatientsQueue and click on it. In the page Settings for
financeNewPatientsQueue – click on the Monitoring tab. Check the checkbox in front of the
queue and click on the Show Messages button. Press the New button to create a new message.
Enter the message text and possibly some properties.
Click on the OK button to publish the message. Go back to JDeveloper where class
NewPatientsQueueListener is still running and find that it has received the message sent from the
WLS Console.
C-51
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
We need to create a directory on the file system of the machine that hosts our SOA Suite
installation. This directory is used for the creation and subsequent deployment of the
configuration details for the JMS Adapter. Create a directory called JMSPlan under the directory
FMW_HOME\Oracle_SOA1\soa\connectors.
Click on Deployments in the Domain Structure tree. In the table with deployments, click
on the JMS Adapter.
C-52
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
C-53
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
Click on the New button. Select the one radio button for IJmsConnectionFactory.
Press Next.
C-54
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
At this point you may be asked for the location for the deployment plan file. If not, it is
already configured and you can safely ignore the next instruction. Set the path to the
JMSPlandirectory you created earlier. Click OK. Verify if the Deployment Plan property has
been set to the directory you indicated.
Return to the Outbound Connection Pools subtab under Configuration. Expand the
IJmsConnectionFactory node. Click on the node for eis/Queue/patients.
C-55
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
In the properties page that appears, click on the Property Value cell for the
ConnectionFactoryLocation. Type jms/ patientsJmsCF and press enter.
These are the steps to go through when the deployment plan should be updated:
C-56
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
C-57
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
<xsd:schema elementFormDefault="qualified"
targetNamespace="http://stmatthews.hospital.com/finance"
xmlns="http://stmatthews.hospital.com/finance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="NewPatientType">
<xsd:sequence>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
C-58
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
Add a JMS Adapter Service to the References lane. It will be used to publish NewPatient
messages to the JMS queue. The Mediator will pass the request messages that it received to this
adapter service. In the first step of the wizard, specify the service name:
PublishNewPatientMessageForFinance. Next, choose the Oracle Enterprise Messaging Service
(OEMS) and pick the WebLogic JMS implementation. On the next page, select the connection to
the Application Server (the same one you use for deploying SOA Composite applications). On
the Adapter Interface page, select the first radio button that says Define from operation and
schema (specified later). On the next page, choose Produce as the operation type and enter
ProduceNewPatientMessage as the name of the operation.
C-59
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
C-60
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
The next page, Produce Operation Parameters, is for configuring the queue and the JMS
adapter connection to use. Enter jms/financeNewPatientsQueue for the queue and
eis/Queue/patients as the JNDI name for the JMS Adapter‟s connection pool to use. You may
want to choose persistent and a time to live of 10 seconds or more (that gives you a chance to see
the messages in the WLS console before they expire).
On the Messages page, select the NewPatient element from the FinanceNewPatients.xsd
document – this defines the structure of the message payload. Note that we could also use the
native format schema builder to work with text messages that do not have an XML structure.
This completes the JMS Adapter Wizard. Press Finish. Next, wire the Mediator to the
JMS Adapter Service. Create the mapping – which is very straightforward, as the message
format for the Mediator request input is the same as the input expected by the JMS service.
C-61
Oracle 11g SOA Suite Handbook: Appendix C May 25, 2011
That should mean that a message has been sent on the JMS Queue
financeNewPatientsQueue. Just like we did before, you can go the WLS Console, navigate to the
Monitor Messages page for this queue and hopefully catch the message before it expires. Check
whether the contents of the message corresponds with whatever you entered on the test
webservice page.
C-62
Oracle 11g SOA Suite Handbook:Appendix C May 25, 2011
In addition to trying to catch the message in the WebLogic Console, we can run the Java
Client that listens to the queue and monitor the message‟s arrival there.
C-63