Skip to content
DevTest Solutions - 8.0.1
Documentation powered by DocOps

Create Virtual Services from JMS Transactions

Last update January 22, 2015

The result of the first procedure is a raw traffic file that can be imported into the Virtual Service Image Recorder. The benefit of this approach is that it eliminates the need to do proxy recording.

In addition to the request and response bodies, the raw traffic file contains all the connection and queue information in metadata and attributes.

In the second procedure, you use the raw traffic file to create a service image and a virtual service model.

Note: This feature is supported for configurations in which JNDI is used to obtain the JMS connection factory. This feature is also supported for configurations in which a direct API from IBM WebSphere MQ is used to obtain the JMS connection factory.
Note: For detailed information about the Virtual Service Image Recorder, data protocols, magic strings, and deploying virtual services, see Using CA Service Virtualization.

To create the raw traffic file from JMS transactions:

  1. Add a JMS transaction frame to the shelf.
  2. Open the shelf.
  3. Click Create VS.
  4. To change the default name, select the name and make your edits, then click save button to save.

  5. Click Create.
  6. Select the project where the the raw traffic file will be added.
  7. (Optional) Edit name prefix. The default prefix is the user name.
  8. Select an option to keep or delete the transactions in the shelf once the VS is created.

  9. Click Create.

To create the service image and virtual service model:

  1. From the main menu of DevTest Workstation, select File, New, VS Image, By recording.
    The Virtual Service Image Recorder appears.
  2. Do the following steps:
    1. In the Write image to field, enter the fully qualified name of the service image to be created.
    2. In the Import traffic field, browse to and select the raw traffic file in the Data folder.
    3. In the Transport protocol field, select Standard JMS.
    4. In the Model file field, enter the fully qualified name of the virtual service model to be created.
    5. Click Next. The next step prompts you to select the message recording style.
  3. If you want to review the request and response queue information, do the following steps:
    1. Select the Review the destinations and transaction tracking mode check box.
    2. If the correlation scheme in the Correlation drop-down list is incorrect, change the value.
    3. Click Next. The next step contains a Destination Info tab and a Connection Setup tab.
    4. The values in the Destination Info and Connection Setup tabs are automatically populated. The Proxy Destination field is set to N/A because you are not doing proxy recording. You should not need to update either tab, but you can do so if CAI does not set a correct value. Click Next. The next step contains response information.
    5. The values in this step are automatically populated. The Response Destinations area contains one or more response queues. You should not need to make changes, but you can do so if CAI does not set a correct value. Click Next. The data protocols step appears.
  4. Do the following steps:
    1. In the Request Side Data Protocols area, click the plus sign.
    2. Click the left column of the newly added row and select the appropriate data protocol. For XML-based applications, Generic XML Payload Parser is a good generic choice.
    3. If the application responses are not in an XML or text format, a response-side data protocol might be required for VSE to perform magic string substitutions on the response.
    4. Click Next.
  5. The next step or steps that appear (if any) depend on the data protocol that you selected. For example, if you selected the Generic XML Payload Parser data protocol, the next step prompts you to create XPaths to form VSE requests. See Using CA Service Virtualization as needed to complete the step or steps. The last step indicates that the recorder is performing post-processing on what has been recorded.
  6. Click Finish.
    The transactions are saved to a service image, and the virtual service model is created.

To run the virtual service:

  1. Shut down the original service.
  2. Go to DevTest Workstation and deploy the virtual service model that you created.
  3. Run a client application with the virtual service as the service.
Was this helpful?

Please log in to post comments.