This topic covers the SonicMQ Transport, which is implemented as an extension to the JMS Transport. Sections include: In addition to JMS Message types, SOAtest and certain Virtualize supporting tools and provisioning action tools support For outbound messaging, a To configure SOAtest to create tests for access SonicMQ: After selecting SonicMQ from the Transport menu within the Transport tab of an appropriate tool, the following options are shown in the left pane of the Transport tab: Connection Settings contains the Settings and Properties tabs. The Properties tab is optional and allows users to specify additional properties to be passed to the JNDI If you select Use Shared Property, a second menu displays from which you select the desired global SonicMQ settings that the tool will use. For more information, see Adding Global Properties.For more information, see Adding Global Test Suite Properties or Adding Global Properties. In addition to the Settings tab, the Connection Settings also include: The Queue/Topic settings contain the following options: Messaging Model options specify how messages are sent between applications. Select either Point to Point or Publish and Subscribe. Message Exchange Pattern options specify whether or not SOAtest or Virtualize receive a response. If Get Response is selected, SOAtest or Virtualize sends a message and receives a response. If Get Response is not selected, SOAtest or Virtualize sends a one-way message and does not receive a response. If Get Response is selected, you can also enable Create consumer on the JMSReplyTo destination before sending the message. If the response is expected to become available very quickly on the This option cannot be mixed with Match response JMSCorrelationID with the request JMSMEssageID because the JMS specification requires vendors to generate the Message Type options allow you to select the message type from the menu. A SonicMQ Message is a Java object that contains the data being transferred between SonicMQ clients. The following Message Types are available: A Sonic MultipartMessage can have multiple parts. Each part has its own name (ID) and content. SOAtest and Virtualize support sending MultipartMessages with a single part. This field specifies the part name and the content is defined by the Request area, such as Form Input, Literal, Literal XML (SOAtest), and so on. SOAtest and Virtualize support receiving The Request Message Properties are optional and allows for any miscellaneous property values to be set into the The Response Message Correlation settings contain the following options: Additional Selector Expression Terms: (Optional) Enter a value to act as a message filter. For tips on specifying a selector, see Using Message Selector Filters (SOAtest) or Using Message Selector Filters (Virtualize). You can add message object outputs to tools that utilize the SonicMQ transport. For example, an Extension tool chained to a tool that uses SonicMQ will have access to the response SonicMQ Message. In the ObjectMessage case, you can use To do this complete the following: Right-click SOAP Client or Messaging Client node, or the Virtualize tool node the node for which you would like to add the output and choose Add Output. The Add Output wizard opens.MultiPartMessage
for the SonicMQ Transport. For JMS Message types, you need to use JMS Transport. For more information on the JMS Transport, see JMS.MultiPartMessage
is constructed with a single part that wraps the request message as "text/xml" type. Users can specify the 'Content-ID' header field of the part via the Part Content ID field. For inbound messaging, both JMS and SonicMQ Transports can parse MultiPartMessage
with multiple parts.Creating New Tests for SonicMQ
Configuring SonicMQ Options
Connection Settings
javax.naming.InitalContext
constructor; in addition to the Provider URL and Initial Context factory properties that are specified in the Settings tab. The Settings tab contains:javax.naming.Context.PROVIDER_URL
passed to the JNDI javax.naming.InitialContext
constructor.javax.nam-ing.InitialContext
constructor as a string value for the property named javax.naming.Context.INITIAL_CONTEXT_FACTORY
.lookup()
method in javax.naming.InitialContext
to create a javax.jms.QueueConnectionFactory
or a javax.jms.TopicConnectionFactory
instance.createQueueConnection()
method in the javax.jms.QueueConnectionFactory
class in order to get an instance of javax.jms.QueueConnection
.Queue/Topic
Messaging Model
Message Exchange Pattern
JMSReplyTo
topic, this option should be enabled to ensure that SOAtest or Virtualize has subscribed to the reply topic before the response message is published.JMSMessageID
after the message is sent. As a result, there is no way to create the consumer on the response destination with that correlation (selector) set until after the message has been set and the JMSMessageID
becomes available. Message Type
Part Content ID
MultipartMessages
with multiple parts and outputs all the part contents as XML to the Response Output of the tool.Request Message Properties
javax.jms.Message
object before it gets sent to a queue or published to a topic. These include predefined properties that get set to the outgoing requests message using one of the corresponding "set" methods in javax.jms.Message
, or any custom property provided with the setStringProperty()
method.Response Message Correlation
JMSCorrelationID = '[msgId]'
will be appended to the selector expression, where msgId is dynamically generated from the outgoing (request) javax.jms.Message
(using the getJMSMessageID()
method). Effectively, this results in the tool blocking until a message with the specified correlation id becomes available in the queue (or topic) and it will only retrieve that particular message, rather than retrieving any message in the queue (or topic). The tool will timeout after the timeout amount elapses and if there is no message that watches the selector criteria.JMSCorrelationID = '[correlationId]'
will be appended to the selector expression, where correlationId is retrieved from JMSCorrelationID
property in the Message Properties section. The option becomes enabled only if such property is added to the Message Properties section. Effectively, this results in the tool blocking until a message with the specified correlation id becomes available in the queue (or topic) and it will only retrieve that particular message, rather than retrieve any message in the queue (or topic). The tool will timeout after the timeout amount elapses and if there is no message that watches the selector criteria.Message Object Outputs for Clients Using SonicMQ
getter
and equals()
methods to validate the response thereby creating a regression control. In addition, you can chain a Diff tool to the Response Traffic and if the response is an ObjectMessage
, SOAtest or Virtualize will convert the inserted serializable object to XML format and perform an XML diff. By doing this you can use data bank values, ignore XPath differences, and so on.
Overview
Content Tools