Previous Topic: Create an XML Agent Variable

Next Topic: Create an  XML Envelope Header Variable

Create an XML Body Variable

XML Body variables let you obtain information from any element in the body (or payload) of an incoming XML message for use in policy expressions and responses.

Specifically, XML Body variables are resolved to the value of an XPath string that identifies an element (and optionally, an operation to perform on that element) of an XML document.

Note: For more information about XPATH, see the XPATH specification available at http://www.w3.org/TR/xpath.

To create a variable

  1. Open the domain to which to you want to add a variable.
  2. Click the Variables tab.

    A table lists the variables associated with the domain.

  3. Click Create Variable.

    The Create Variable screen appears.

  4. Verify that Create a new object is selected, and click OK.

    Variable settings open.

  5. Type the variable name in the Name field.
  6. Select XML Body from the Variable Type list.
  7. XML Body variable settings open.

    Note: Click Help for descriptions of settings and controls, including their respective requirements and limits.

  8. Enter information in the following fields:
    Description

    (Optional) Specifies a brief description of the variable.

    Limits: No more than 1KB.

    Return Type

    Specifies the data type in which the value of the specified XPATH query should be returned:

    • Boolean
    • Date
    • Number
    • String (the default)
  9. Do one of the following:
  10. Optionally, if you are working from a loaded schema in the Select a node group box, specify an XPath function (count, div, index, mod, sum) that you want to apply to a repeatable schema element, by choosing it from the Function drop-down list.

    The Function option lets you create more complex mappings by processing functions that further evaluate the XML document.

    Note: For more information about these functions, go to the XPATH specification at http://www.w3.org/TR/xpath.

  11. Click Finish.

    The variable appears in the Variables tab of the domain. The variable can now be used in policy expressions or responses.