Import Request/Response Message Dialog Box

This dialog box enables you to import messages from a file, by copying from the clipboard, or by manually entering text. You can also import multiple files simultaneously.

To access

In the Data Model Editor, expand a rule.

  • To import messages to a specific operation/URI space, select the operation/URI space in the Operations/URI Spaces pane. Right-click inside the rule and select Import Message.
  • To import messages at the service level, select the service in the Operations/URI Spaces pane. Right-click the rule and select Import Message. (Available for SOAP and XML services only.)

  • You can also import data to replace a selected row in the rule. Right click the row, and select Replace Message.

Available for: Custom rules and the Learned Data rule.

Important information
  • Importing multiple messages at the service level: The messages are placed in the proper operations.

    If a message contains a new schema/message structure that does not currently exist in any operations in the service:

    • For an XML service, a new operation is created.
    • For a SOAP service, an error message displays.

  • Importing multiple messages directly into a specific operation:

    If a message contains a new schema/message structure that does not currently exist in the operation:

    • For a REST service, a new data format is created.
    • For an XML or SOAP service, an error message displays.
Relevant tasks Modify Virtual Service Behavior
See also Data Modeling

User interface elements are described below:

UI Element Description

Expand/Collapse. Click to show/hide message content.

Request/Response Message

Enter request and response message content.

You can import request messages, response messages, or both.

From File

Click to select a file from the file system. Each file may contain only the request or response part of a single message.

To import multiple messages, select multiple files to import. Service Virtualization matches pairs of request and response messages by file name, according to one of the following methods:

  • Files are matched according to any numerical index present within the file name.

    • The index can be located at the beginning or end of the file name, or as a separate part of the file name, . For example: 5_req.xml, req5.xml, req.5.xml

    • The index must be in the same location in all files.
    • Example: 9984_req1.xml and 9984_req2.xml. The files are compared according to index numbers are 1 and 2 (not 9984).

  • Files with the same name are paired.

File name extensions are ignored.

Tip: Place request and response files in separate folders to ease the import process.

From Clipboard Pastes clipboard content into the message box.
Logged Message

Import messages that were previously logged in Service Virtualization. For details, see Message Logging.