The
following steps outline how to create a business service that will publish to a JMS Queue or Topic. For this example, I created the Business Service in the OSB Console. You could also use Eclipse and the steps would be very similar.
1. Log into OSB Console.
2. Create new project. For this example I used the project name of PublishJMSQueue.
3. Create
a new folder called BusinessServices to hold the service we are going to create.
4. Navigate to the BusinessServices
folder and select Business Service from
the Create Resource menu.
5. Enter Service Name, select Messaging
Service for the Service Type and
click on Next.
6. Select the Request Message Type, Response
Message Type and click on Next. For this example I am using Text for the Request Message Type and None for the Response Message
Type. Below is information on the other
types from the Oracle Documentation.
None - Select this option if there is no request message (HTTP
GET example)
Binary - Select this option if the content-type of the message is
unknown or not important.
Text - Select this option if the message can be restricted to
text.
MFL - Select this option if the message is a binary document
conforming to an MFL definition. You can configure only one MFL file.
For MFLs, you can click Browse to select an MFL from the MFL
Browser, then click Submit.
XML - Select this option if the message is an XML document. To
provide some type information, you can choose to declare the XML schema type of
the XML document exchanged.
7. Select jms for Protocol, enter
the Endpoint URI for the queue/topic
you are publishing to, click on Add
and then click on Next. You can leave everything else with the
default values.
Note: The Endpoing URI follow the format of “jms://host:port(,host:port)*/FactoryJndiName/DestJndiName”. If you are using a Weblogic queue/topic you
do not need to change the FactoryJndiName, OSB will prepopulated the correct
JNDI name. You can get the DestJndiName
from the Weblogic console (domain -> Services -> Messaging -> JMS
Modules -> <Module Containing the Queue/Topic you are publishing to>
-> JNDI Name)
8. Set Destination Type, Message Type and then click on Last.
Everything else can remain at the default value. For this example, we are using a queue for destination type and Text for message type.
9. Review Settings and then click Save.
10. Test Business Service.
No comments:
Post a Comment