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.
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:
- Add a WebSphere MQ transaction frame to the shelf.
- Open the shelf.
- Click Create VS.
To change the default name, select the name and make your edits, then click to save.
- To view the consolidated transactions, click
- To delete a consolidated transaction, click
- Click Create.
- Select the project where the raw traffic file will be added.
- (Optional) Edit name prefix. The default prefix is the user name.
- Select an option to keep or delete the transactions in the shelf once the VS is created.
- Click Create.
To create the service image and virtual service model:
- From the main menu of DevTest Workstation, select File, New, VS Image, By recording.
The Virtual Service Image Recorder appears.
- Do the following steps:
- In the Write image to field, enter the fully qualified name of the service image to be created.
- In the Import traffic field, browse to and select the raw traffic file in the Data folder.
- In the Transport protocol field, select IBM MQ Series.
- In the Model file field, enter the fully qualified name of the virtual service model to be created.
- Click Next. The next step prompts you to select the message recording style.
- If you want to review the request and response queue information, do the following steps:
- Select the Review the queues and transaction tracking mode check box.
- If the correlation scheme in the Correlation drop-down list is incorrect, change the value.
- Click Next. The next step contains a Destination Info tab and a Connection Setup tab.
- 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.
- 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.
- Do the following steps:
- In the Request Side Data Protocols area, click the plus sign.
- 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.
- 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.
- Click Next.
- 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.
- Click Finish.
The transactions are saved to a service image, and the virtual service model is created.
To run the virtual service:
- Shut down the original service.
- Go to DevTest Workstation and deploy the virtual service model that you created.
- Run a client application with the virtual service as the service.