Message Routing Context Variables
The following table lists the predefined context variables related to message routing.
gateway83
The following table lists the predefined context variables related to message routing.
Variable | Description |
---|---|
${httpRouting.latency} | Returns the amount of time it took, in milliseconds, to send a request to its downstream endpoint and receive a response back. This variable is only available after a message has been routed. |
${httpRouting.reasonCode} | Returns a reason code that explains why the HTTP routing failed. For a list of the reason codes, see HTTP Routing Response Codes. |
${httpRouting.url} | Returns the Protected Service URL from the last routing assertion. This variable should be used after a routing assertion. When used without a suffix, the entire URL is returned. When used with one of the following optional suffixes, only that part of the URL is returned:
Examples: ${httpRouting.url} returns the entire Protected Service URL${httpRouting.url.host} returns only the host name portion of the URLThe .file and .path suffixes will usually return the same values. |
${rawtcp.reasonCode} | Sets the numeric value of the reason codes which are set regardless of the routing outcome. Below are the codes.
This variable returns a value only after the Route via Raw TCP Assertion has run. The variable is not populated during normal HTTP routing. |
${request.authorized} | Returns "true" if one of the following conditions apply, otherwise returns "false":
|
${request.completed} | Returns "true" if the service policy succeeded and routing completed successfully (or was absent from the policy); otherwise, returns "false". |
${request.elapsedTime} | Returns the amount of time, in milliseconds, between receiving the request and the time the assertion that uses the variable is executed. |
${request.routingTotalTime} | Returns the current cumulative time spend inside routing assertions since the request was received by the Gateway and the time the assertion that uses the variable is executed. |
${routingStatus} | Returns the routing status:
|
${service.defaultRoutingURL} | This variable allows routing assertions to be updated when a service endpoint changes following a change in UDDI.
The value of this variable is used in the routing assertion when publishing a new SOAP service. This context variable is read only . |
${service.url} | This context variable has been replaced by the variable ${httpRouting.url}. Though this variable still works, it is highly recommended that you adjust your service policies to use the new variable instead. |