Select a Target Message

Many assertions can apply to a specific target message: request, response, or a context variable. The default target depends on whether the assertion appears before or after a routing assertion.
gateway90
Many assertions can apply to a specific target message: request, response, or a context variable. The default target depends on whether the assertion appears before or after a routing assertion.
 
Be sure the assertion is located correctly in a policy after selecting a target message (see the policy validator for warnings). For example, specifying "Response" as the target message when the assertion appears before the routing assertion will not return correct results.
 
To select a target message
:
  1. Add the assertion to the policy development window.
  2. Right-click on the assertion and then choose "Select Message Target" from the context menu.
    The Message Target dialog is displayed.
    If the Message Target dialog is read only, it may be caused by the policy being imported into a
    Layer7 API Gateway
    where the licensing does not include the specified assertion. For a list of assertions licensed in each version of the
    Layer7 API Gateway
    , see Features by Product.
  3. Specify the target for the message:
    • Request
      : The target is the request message. This includes both the inbound request (message from the client to the
      Layer7 API Gateway
      ) and outbound request (message from
      Layer7 API Gateway
       to the web service.
    • Response
      : The target is the response message. This includes both the inbound response (message from the web service to the
      Layer7 API Gateway
      ) and outbound response (message from
      Layer7 API Gateway
       to the client).
    • Other Context Variable
      : The target is the specified context variable. This variable must be of type Message and must be predefined or has been set in the policy prior to the assertion. For more information on Message variables, see Context Variable Data Types.
    • Enter the context variable in the field in the format:
      ${variableName}
       
  4. Click [
    OK
    ].
    The message target is indicated by a "Request:", "Response:" or "
    ${variableName}
    " prefix in the assertion name in the policy window.
    Examples:
    Request: Authenticate against XYZ
    Response: Add signed Timestamp