How to: Configure SoapUI for TIBCO JMS
– Version 1.00
DISTRIBUTION DATE: 2 February 2015 STATUS: Draft
|
By:
Warren Chen
Introduction
This document provides
guide for configure SoapUI for TIBCO EMS.
There are some details that you need to know about
a.
The EMS Server connection
url:
e.g. For
the server ULTTIB03 (IP:10.20.10.71)
It is tcp://10.20.10.71:7222
b.
The EMS factory details:
Run
command line show factory after you connect to EMS Server by using admin login:
c.
EMS Authentication details
(User/Password)
Ensure that you have the sample queue set up already in EMS Server
e.g. st.shippingOrderService.v1.Inquiry.q.v1
and you got queue details showing in
following files:
d.
acl.conf:
QUEUE=st.shippingOrderService.v1.Inquiry.q.v1 USER=bw_user
PERM=receive,send
e.
queue.conf
st.shippingOrderService.v1.Inquiry.q.v1
secure,maxbytes=10GB,store=$sys.failsafe
f.
user.conf
bw_user:$2$mK5LYAty$x5nM+Dx/VBd0svqbdJkjsOzq:"StarGate
user."
admin:$2$IObMucWx$iyojS0rlJdWYAxNaA7VuBv/d:"Administrator"
[Explain: bw_user is related with acl.conf for the queue
accessibility while admin is the admin user for the ems server]
Instruction to set up configuration in SOAPUI
(examples are using SOAPUI 4.5):
Open up SOAPUI then start up the Herms:
Once Herms starts up, create a new session
called “TIBCO.JNDI”
After the new session “TIBCO.JNDI” careated,
you then need to add the jar files and create a SOAPUI plugin provider.
In this case we will create a
provider called “TIBCO.JNDI”.
In the “Providers” tab of the session
configuration window, right click and create new group:
Types in the name as “TIBCO.JNDI” then clicks
on OK
Add external TIBCO EMS Client Jar files into
the newly created “TIBCO.JNDI”:
Browse to
<TIBCO_EMS_HOME>/clients/java/ then multi-select all the jar files.
Then click on Open to finish this step.
Once finished, you should be able to see
“TIBCO.JNDI” showing in the drop down of session “Connection Factory/Loader:”
in the “Sessions” tab in the session
configuration window
Go to the session tab in the configuration
window.
In the Plug In section, select “TIBCO EMS” as
the plugin then configure the connection details, username and password for the
ems server as:
In the Connection Factory section, select
“TIBCO.JNDI” as loader, then select
“com.tibco.tibjms.TibjmsQueueConnectionFactory” as Class, then finish the
configuration as following:
After
that, leave the rest of the section as default then click on OK:
Check the EMS connection
Right click on the newly created “TIBCO.JNDI”
session and discover the Queue/Topics to check the connectivity with EMS server
that you just configured:
If succussed, then you should see a list
of destinations be discovered:
Queues:
Topics:
Double click on the queue that you will work
on, and see if you can view the queue details, if you cannot, then it means
the you didn’t configure the “Connection
Factory” section right in the “Sessions” tab in the Session configuration
window:
e.g. The queue details:
e.g. If you cannot see the queue:
Also check the queue property in Herms:
Load the JMS web service WSDL into SOAPUI
then start configuring the endpoint.
For the project you are configuring, select
the port type then create the endpoint:
For the project you are configuring, select
the port type then create the endpoint:
[Note: the receive/Subscribe destination will need to be changed in
the future, otherwise it won’t work, as the value is not right!]
Open up the request of one Soap-Action under
the port that you are configuring:
Two things that you need to do here:
1>
Configure the “JMSReplyTo:”
Configure it as
[QueueName].reply
e.g. In this
case: st.shippingOrderService.v1.Inquiry.q.v1.reply
[Note: After this
configuration, you should see st.shippingOrderService.v1.Inquiry.q.v1.reply
show up next time in the “Add JMS endpoint” configuration
window/”Receive/Subscribe destination” drop down]
2>
Tick “Add SoapAction as
property” field:
3>
After configuration it should
look as:
Configure JMS property tab:
Add “SOAPAction” property and the value
should be /[SOAPAction]
[Note: The soap action value should be the same as in WSDL]
e.g.:
Start testing the soap request/response
action
Check the endpoint is now changed to:
Jms://[SessionName]::[request destination
queue]::[reply destination]
[Note: the reply destination should be the same as “JMSReplyTo”
field in the JMS Headers Tab]
In the testing, you may receive the SOAP
response as unformatted xml:
it
is due the incompatibility of the SOAP Envelop namespace.
Change the name space from:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
">
To:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope">
Then you can reformat the xml and get:
Beautiful!!
No comments:
Post a Comment