Previous Topic: Data DesensitizerNext Topic: DRDA


Delimited Text

The Delimited Text data protocol lets you parse delimited textual data into arguments and values. This protocol takes the body of the request or response, parses it, and then replaces the body with an XML representation of the parsed data. For example:

“name1=val1;name2=val2”

becomes:

<name1>val1</name1><name2>val2</name2>

Follow these steps:

  1. Complete the Basics tab of the Virtual Service Recorder.
  2. Select the Delimited Text Data Protocol on both the request and response sides.
  3. After the recording completes, select the format for your delimited text request:
    Name/Value Pairs

    Defines the delimiter between the name/value pairs and the delimiter between the name and value. For example, for the following data:

    "name1=val1,name2=val2,name3=val3"
    

    the delimiter between the pairs is a comma, and the delimiter between the name and value is an equal sign.

    List of Values

    Defines the delimiter between the values.You can use two types of lists:

    • List of values separated by a textual delimiter.

      For example, for the following data:

      	"val1,val2,val3,val4"
      

      the delimiter is a comma.The parameters are named positionally.

    • List of values separated by new line characters, such as a carriage return or line feed.

      The parameters are named positionally.

    Fixed Width

    Defines (as a whole number) the width of the data field. The parameters are named positionally.

    RegEx Delimited

    Defines a regular expression that locates the values. For example, for the following data:

    "xxxx123xxx456xx789"
    

    a RegEx of \d\d\d finds “123”, “456”, and “789” as values and discard the rest.The parameters are named positionally.

    Line Delimited
  4. Complete the following fields.
    Field Names Path

    Defines the location of a field names document, which is a line-delimited document that specifies an ordered list of the names of fields. By default, the fields are named value1, value2, value3, and so on. To specify different names for those XML elements, use a field names document.

    Delimiter Type

    Defines the delimiter type used to separate name/value pairs and lists of values. Text or hex delimiters are automatically selected based the specified delimiter.

    Values: Any alphanumeric characters, and the following:

    • \r (carriage return)
    • \n (newline)
    • \t (tab)

    You can also use hexadecimal notation to specify delimiters.

    Note: You can only use delimiters that are valid XML 1.0. Specifying non-printable control characters makes the service image unusable.

    XML Elements as request arguments

    Specifies whether to add parameters and associated values to requests as arguments.

    Values:

    • Selected: Automatically adds the parameters and associated values to the request as arguments.
    • Cleared: You must use the Generic XML Payload Parser (or a similar protocol) to select which values become arguments.

    Note: This check box has no effect when the Delimited Text data protocol is used on the response side.

  5. Click Next.

    The name/value pairs are represented in XML. Here, you can double-click a transaction to show the contents of that transaction.

  6. Configure the delimiters for the response side in the same way you did for the request side.

    You can see the virtual service image and the payload that is converted to XML when the processing completes.

More Information:

Generic XML Payload Parser Data Protocol