...
Choose the Traffic > Generate Parameterized Messages option in one of the available creation wizards. See Adding Projects, Virtual Assets, and Responder Suites for basic information about adding responders.
- Specify the following information in the Traffic wizard:
- Specify the location of the traffic file. This is optional if a Definition file has been entered.
- Change the character encoding if needed.
- (Optional) Specify the service definition file. Providing a service definition helps Virtualize create better message groupings and data source correlations.
If you want to populate the wizard with a previous group of settings saved in a template, enter the location of that template. See Using Configuration Templates to Reuse and Share Wizard Settings - Virtualize for details about creating and using templates in Virtualize.
- Click Next and choose one of the following modes from the Connection Mode dropdown and configure the connection details accordingly:
- Host/Port:
- Enter the Data Repository Server's host and port. You can also choose the embedded server or an existing remote server from the drop-down menu.
- If you select the embedded server, the Port, Username, and Password fields will be grayed out. If you select a remote server, the Port, Username, and Password fields will be automatically populated, but these can be adjusted if necessary.
- Select or enter the name of the repository you want to use in Repository name. If you enter the name of a new repository, that repository will be created.
- Specify your credentials to access the data repository server (if required).
- To use SSL to connect to the server, enable Use SSL.
- Enter the Data Repository Server's host and port. You can also choose the embedded server or an existing remote server from the drop-down menu.
Connection String: Enter the MongoDB connection string. An example of a connection string that connects to a local server with SSL is shown below. See https://www.mongodb.com/docs/manual/reference/connection-string/ for more information about MongoDB connection strings.
Code Block title MongoDB Connection String Example mongodb://localhost:2424/?tls=true&tlsAllowInvalidHostnames=true
Info If an authentication database is specified in the connection string, you should use the
/defaultauthdb
component; only use the?authsource=defaultauthdb
option if credentials are specified in the connection string.
- Host/Port:
Click Validate to verify the connection settings.
Click Next and configure the settings in the Message Format and Grouping Strategy screen.
Verify that Request message format and Response message format are set to the correct format. Virtualize will attempt to identify the message format of the request and response based on the first message in the traffic file. All requests in a single traffic file are expected to have one format, and all responses in the same file are expected to have one format. The request format may be different than the response format. If the message format is not detected, Plain Text will be selected.
Conversion options are available for some formats, such as EDI or custom formats. Click the Conversion Options button and make the desired changes.
Choose a message grouping option. See Message Grouping Options for details.
- If you specified a service definition or template file, you can enable the Constrain option in the Message Group Creation Options section. If this option is enabled, only the message groups defined in either the template or service definition file will be grouped. All other messages will be ignored. If this option is disabled, Virtualize will group all messages that appear in the traffic file. If a service definition and template file are provided and this option is enabled, groupings will be constrained according to the template file prior to being constrained by the service definition. As a result, a message will be ignored if it is defined in the service definition but not in the template file. The Constrain option is enabled by default.
- If you specified a service definition or template file, you can enable the Empty groups option in the Message Group Creation Options section. When this option is enabled, groups will be created based on a service definition or template file even if the traffic file does not contain messages that match the group criteria. When this option is disabled, groups without messages will not be created. The Empty Groups option is set to false by default if a traffic file is specified alongside a service definition or traffic template. The Empty Groups option is set to true by default if no traffic file is specified.
- Click Next and review the information about the operations and messages in the Message Grouping Review screen. See Message Grouping Review Screen for details.
- Click Next. If If the Autoconfig option for each group was enabled, the Data Reuse screen will open and you can skip the next step.
- If the Autoconfig option was disabled in the previous screen, you will need to manually configure the request matching options in the Request Matching screen. See Configuring Request Mapping Options.
- Configure how the imported traffic should be reused or how it should affect existing data in the Data Reuse screen. See Configuring Data Reuse Options for details.
- Click Next and specify any additional configurations in the Final Options screen:
- Enable the Form or Literal option in the Payload section to configure the wizard to create messages in Form or Literal mode. See Form Input or Literal View Options_SOA for details.
You can enable the Export configuration data into a reusable template option and specify a file name and location to save the settings you used in this wizard as a template. See Using Configuration Templates to Reuse and Share Wizard Settings - Virtualize for details about creating and using templates.
- Click Finish.
...
Note that custom transport headers and any SOAP Headers (e.g. for example, WS-Security Headers) that are present in the traffic file are not configured automatically into the generated assets or data repository data sets. You can specify them in the generated Message Responders (see Message Responder Overview for details).
...
Although the recorded traffic might have child elements appear in a varying order (e.g.for example, the "parent" in one of the response message messages has "child1" and then "child2", while the "parent" in another response message has "child2" and then "child1"), Virtualize will parameterize message data in a fixed order. Thus, in this example, the elements "child1" and "child2" will always be in the same order within the response message.
...