Previous Topic: Create an XML Agent VariableNext 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.

Follow these steps:

  1. Click Policies, Domain.
  2. Click Variables.
  3. Click Create Variable.

    Verify that the Create a new object of type Variable option is selected.

  4. Click OK.
  5. Select a domain from the list and click Next.
  6. Type the variable name in the Name field.
  7. Select XML Body from the Variable Type list.
  8. XML Body variable settings open.
  9. 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)
  10. Do one of the following:
  11. 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.

  12. Click Finish.

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