Page tree

Skip to end of metadata
Go to start of metadata

This topic explains how to configure and apply the Header Data Bank tool that extracts headers from one message and makes them available as parameters in another. Sections include:

Understanding Header Data Bank

The Header Data Bank tool enables you to extract values from HTTP and JMS headers from one place and use those values in another place.  The Header Data Bank enables you to take a value from the header of an incoming request and use it to set a value in the response.The Header Data Bank tool can be chained to any other tool that outputs HTTP or JMS headers. It can extract values from the HTTP or JMS header and makes that information available for later use.

Configuring Header Data Bank

To configure the Header Data Bank tool:

  1. Ensure that you have a set with at least two tools.

  2. Right-click the node for the tool associated with the data you want to extract (e.g., if you want to extract a value from an incoming request or outgoing response, choose the Message Responder that handles those messages), then choose Add Output.

  3. In the Add Output wizard, indicate where you want to extract the value from (e.g., Response or Request Transport Header) and click the Finish button. A Transport Header> Header Data Bank node displays in the Tool 1 branch.

  4. Double-click the Transport Header> Header Data Bank node. The following Header Data Bank operations display in the right GUI panel.
    • Name: Specifies the name of the Data Bank tool.
    • Available Headers: Specifies the headers available in the HTTP or JMS traffic. This field is blank after first adding the Header Data Bank node to the tool.

    • Extract/Alter tabs: Specifies the headers you would like to extract or alter for use in another message. You can extract a header through the Extract tab and you can alter a header through the Alter tab.

  5. If using the tool in Virtualize, click Add Header to add a default header. You can select the values added to these columns and click Modify to change the default header name.



    If using the tool in SOAtest, right-click the main test suite tree node and select the Test Using ’Example Configuration’ from the shortcut menu to initialize the Header Data Bank and verify the available headers.
     



  6.  To extract a header, select the Extract tab and complete one of the following:

    • To extract a header from the Available Headers, select a header from the Available Headers view and click the Add Header button.
      After selecting a header, it is added to the Selected Headers list in the Extract tab. The Selected Headers list consists of the following columns:
      • Header: Displays the selected Header name. To edit a selected Header, double-click the desired Header in the Header column and edit the Header text.
      • Custom column name: Specifies the name of the data source column in which to store the value. Values are stored in an internal data source unless you specify otherwise (e.g., if you select Writable datasourcecolumn or Variable). This is the name you will use to reference the value in other places. For example, if it is stored in a data source column named MyValue, you would choose MyValue as the parameterized value. You could also reference it as ${My Value} in literal or multiple response views.



      • Write to all columns that match: Enables storing the value in all columns whose name contains the given string. When extracting multiple values from a message, each value will be written across all the columns that match. In contrast, if you pick a single writable data source column (the above option), then the values will be written down the column across multiple rows.

      • Variable: Enables saving the value in the specified variable so it can be reused across the current test suite (SOAtest) Responder suite or Action suite (Virtualize). The variable must already be added to the currentResponder suite or Action suite as described in Defining Variables in Virtualize. Any values set in this manner will override any local variable values specified in the suite properties panel.

    • To extract a Header that is not in the Available Headers, click Add Header. A new Header will be added to the Selected Headers list in the Extract tab. Select the header and click Modify to change the default header to the header name you want to extract.

  7. To alter a Header, select the Alter tab and complete one of the following:

    • To alter a Header from the Available Headers, select a node from the Available Headers view and click the Add Selected Nodes button.
      After selecting a header, it is added to the Selected Headers list in the Alter tab. The Selected Headers list consists of the following columns:

      • Header: Displays the selected Header name. To edit a selected Header, double-click the desired Header in the Header column and edit the Header text.

      • Data Source column name: Data Source column names of Selected Headers will display as parameterized values in the tool panel, meaning that you will be able to use these Selected Elements in another tool to send as part of the message.

    • To alter a Header that is not in the Available Headers, click Add Header. A new Header will be added to the Selected Headers list in the Alter tab. Select the header and click Modify to change the default header name.

Using the Extracted Value

After adding and/or modifying the extraction, configure the header values and properties (in the Headers tab) that you want to use the extracted data. 

Set the value to Parameterized, and choose the appropriate item from the drop-down. For example, if you saved the value to the "MyVariable" variable, you would select it as follows.
 


  • No labels