Skip to content
DevTest Solutions - 8.0.1
Documentation powered by DocOps

Create Virtual Services from WebSphere MQ 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.

If you are working with binary payloads, use an extension data protocol handler to convert the binary requests into an XML form that VSE can handle. You select this data protocol handler in the Virtual Service Image Recorder.

If the response is also binary, you have two options:

  • Use an extension data protocol handler to parse the binary responses into a text format for the service image. At runtime, the original binary format is reconstructed for each response.
  • Do not use an extension data protocol handler for the response. At runtime, the VSE engine returns the original binary response and is not able to perform magic string substitutions.

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

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 WebSphere MQ transactions:

  1. Add a WebSphere MQ 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. To view the consolidated transactions, click .
  6. To delete a consolidated transaction, click Remove from Virtual Service listing button.
  7. Click Create.
  8. Select the project where the raw traffic file will be added.
  9. (Optional) Edit name prefix. The default prefix is the user name.
  10. Select an option to keep or delete the transactions in the shelf once the VS is created.
  11. Click Create.
Note: For more information about consolidated transactions, see Consolidation of Transactions When Creating Virtual Services.

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 IBM MQ Series.
    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 queues 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 Queue 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 the VSE engine 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.