Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SOAVIRT_9.10.5_CTP_3.1.1

...

The Settings tab contains the following:

...

  • If you created a Shared Property for JMS Connections, a drop-down menu will be available from which you can choose Use Local Settings or Use Shared Property.
    • If you select Use Shared Property, a second drop-down menu displays from which you select the desired global JMS settings that the tool will use. For more information on global JMS settings, see Adding Global Test Suite Properties.
    • If you select Use Local Settings, or if no shared property is specified, you can configure the rest of the options for Connection Settings.

  • Provider URL: Specifies the value of the property named javax.naming.Context.PROVIDER_URL passed to the JNDI javax.naming.InitialContext constructor.
  • Initial Context: Specifies a fully qualified class name string, passed to the JNDI javax.naming.InitialContext constructor as a string value for the property named javax.naming.Context.INITIAL_CONTEXT_FACTORY.
  • Connection Factory: Specifies the JNDI name for the factory This is passed to the lookup() method in javax.naming.InitialContext to create a javax.jms.QueueConnectionFactory or a javax.jms.TopicConnectionFactory instance.

...

  • Queue Connection Authentication: Allows users to provide a username and password to create a queue connection. Select the Perform Authentication check box and enter the Username and Password to authenticate the request. If the correct username and password are not used, the request will not be authenticated.The username and password provided here is passed to the createQueueConnection() method in the javax.jms.QueueConnectionFactory class in order to get an instance of javax.jms.QueueConnection.

...

...

  • Keep-Alive Connection: Select to notify the test whether to share or close the current connection. The shared connections are returned to the connection pool to be used across the test suite. A life cycle of a connection pool is as follows:
    • For a single test, it is destroyed at the end of the test execution.
    • For a test suite, it is destroyed at the end of the test suite execution.
    • For a load test, it is destroyed at the end of the load testing.

Anchor
jms_queue_topic
jms_queue_topic
Queue/Topic

...

  • Match response JMSCorrelationID with request JMSMessageID: If selected, the term 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.
  • Match response JMSCorrelationID with request JMSCorrelationID: If selected, the term 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 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.
  • Additional Selector Expression Terms: (Optional) Enter a value to act as a message filter. For example, by entering username==John, only messages that contain "John" as a username will be delivered. If this field is left blank, then any messages can be received from the queue.
    This expression is passed to the createReceiver() method of the javax.jms.QueueSession class in point to point messaging, or the createSubscriber() method of the javax.jms.TopicSession class in publish and subscribe messaging. For tips on specifying a selector, see Using Message Selector Filters.

...

Message Object Outputs for Clients Using JMS

Message Object Outputs for Clients Using JMS

You

...

can add message object outputs to SOAP Clients and Messaging Clients that utilize the JMS transport. For example, an Extension tool chained to a Messaging Client that uses JMS will have access to the response JMS Message. In the ObjectMessage case, you can use 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 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, etc.

To do this complete the following:

  1. Right-click the SOA Client or Messaging Client node for which you would like to add the output and select Add Output from the shortcut menu. The Add Output wizard displays.

    Image Modified

  2. Select Response> Message Object in the left pane of the Add Output wizard and then choose a New Output or Existing Output and the desired tool (e.g. an Extension tool) from the right pane.
  3. Click the Finish button. SOAtest adds the new output to the selected Client node.

Anchor
jms_provider_configuration
jms_provider_configuration
Configuration for Popular JMS Providers

See JMS Provider Configuration

...

Responding to a Temporary JMSReplyTo Queue

To respond to a JMS message with a temporary queue set in the JMSReplyTo field:

  1. Create a Call Back Tool and configure it to receive the JMS message.
  2. Right-click the Call Back Tool and choose Add Output> Incoming JMS Message>  Extension tool.
  3. Write a custom script that places the incoming message (input object) into the scripting context with a predetermined key.
    • This key is defined within the SOAtest Extensibility API under SOAPUtil.JMS_MSG_KEY. To access the SOAtest Extensibility API, choose Parasoft> Help, then look for the book titled "Parasoft SOAtest Extensibility API".

    • Here is a Jython example:
      from soaptest.api import *

      def getJMSReplyTo(input, context):
        context.put(SOAPUtil.JMS_MSG_KEY, input)
  4. Create and configure the tool that will send the JMS response message.
    • SOAPUtil.JMS_CONTEXT_QUEUE, which is another keyword defined in the SOAtest Extensibility API,  should be used as the JMSDestination of this tool.

SOAtest will then use the temporary queue of the received message as the destination in place of the keyword entered as the destination.

Anchor
jms_message_selector_filters
jms_message_selector_filters
Using Message Selector Filters

...

The Queue Browser allows you to see the contents of queues deployed on Websphere MQ, Websphere Application Server, Tibco EMS, Sonic MQ, ActiveMQ, and any other JMS provider. See 

...

Browsing Queues

...

 for details.