CentraSite User's Guide : Runtime Governance : Run-Time Policy Management : Built-In Run-Time Actions Reference (CentraSite Business UI) : Built-in Actions for Run-Time Policies (CentraSite Business UI) : Dynamic Routing
Dynamic Routing
This action enables Mediator to support dynamic routing of virtual aliases based on policy configuration. The policies configured are enforced on the request sent to a service and these requests are forwarded to the dynamic endpoint.
You can define the routing decisions based on one of the following routing options:
*Header: You can define the dynamic URL based on the HTTP header value sent by the client. This header name is configured by the API provider and is used to decide the routing decisions at the virtual service. The request message must be routed to the dynamic URL generated from the HTTP header value.
*Context Variable: You can define the dynamic URL based on the context variable value. The API providers must provide IS service in the policy action, Invoke webMethods Integration Server. IS service would perform custom manipulations and set the value for the Context Variable ROUTING_ENDPOINT. Mediator takes this ROUTING_ENDPOINT value as the Native endpoint value and performs the Routing.
Input Parameters
The table lists the input parameters to be configured based on the routing options:
Route Using: Header
Value
Description
Header name
String. Mediator uses the HTTP header name that you specify in the Header name field to invoke the virtual service. The name specified in this field is not case-sensitive.
Route Through
URI. Mandatory. Configure the complete or partial dynamic routing endpoint with ${sys:dyn-Endpoint} variable. For example, http://HOSTNAME:5555/rest/com/softwareag/dynamicURI/validateDynamicURI/${sys:dyn-Endpoint}.
At run-time the system-defined alias "${sys:dyn-Endpoint}" is replaced with the value of the header name in the incoming request. For example,
http://HOSTNAME:5555/rest/com/softwareag/dynamicURI/validateDynamicURI/test.
Click the Configure Endpoint Properties icon (next to the Route Through field) if you want to configure a set of properties for the specified endpoint. Alternatively, Mediator offers local endpoint where the native endpoint is hosted on the same Integration Server as Mediator.
Default Route- To
URI. Mandatory. Enter the URL of the native API endpoint to route the request to in case the configured header key is not available in the incoming request. For example:
http://mycontainer/creditCheckService
Click the Configure Endpoint Properties icon (next to the Default Route-To field) if you want to configure a set of properties for the specified endpoint. Alternatively, Mediator offers local endpoint where the native endpoint is hosted on the same Integration Server as Mediator.
Route Using: Context Variable
Value
Description
Route Through
URI. Mandatory. Configure the complete or partial dynamic routing endpoint with ${sys:dyn-Endpoint} variable. For example, http://HOSTNAME:5555/rest/com/softwareag/dynamicURI/validateDynamicURI/${sys:dyn-Endpoint}.
At run-time the system-defined alias "${sys:dyn-Endpoint}" is replaced with the value of the key ROUTING_ENDPOINT in the message context. For example,
http://HOSTNAME:5555/rest/com/softwareag/dynamicURI/validateDynamicURI/test.
Click the Configure Endpoint Properties icon (next to the Route Through field) if you want to configure a set of properties for the specified endpoint. Alternatively, Mediator offers local endpoint where the native endpoint is hosted on the same Integration Server as Mediator.
Default Route- To
URI. Mandatory. Enter the URL of the native API endpoint to route the request to, in case the key ROUTING_ENDPOINT is not set in the message context. For example:
http://mycontainer/creditCheckService
Click the Configure Endpoint Properties icon (next to the Default Route- To field) if you want to configure a set of properties for the specified endpoint. Alternatively, Mediator offers local endpoint where the native endpoint is hosted on the same Integration Server as Mediator.
Configure Endpoint Properties  (icon)
Optional. This icon displays the Endpoint Properties dialog box that enables you to configure a set of properties for the Mediator to route incoming requests to the native API as follows:
SOAP Optimization Method
This is applicable only for a SOAP API.
Specify the optimization method that Mediator will use to parse the SOAP requests to native API:
Value
Description
MTOM
Mediator will use the Message Transmission Optimization Mechanism (MTOM) to parse SOAP requests to the API.
SwA
Mediator will use the SOAP with Attachment (SwA) technique to parse SOAP requests to the API.
None
Default. Mediator will not use any optimization method to parse the SOAP requests to the API.
Note:  
Keep the following points in mind:
*Bridging between SwA and MTOM is not supported. If a client sends a SwA request, Mediator can only forward SwA to the native API. The same is true for MTOM, and applies to responses received from the native API. That is, a SwA or MTOM response received by Mediator from a native API will be forwarded to the client using the same format it received.
*When sending SOAP requests that do not contain a MTOM or SWA attachment to a native API that returns an MTOM or SWA response, the request 'Accept' header must be set to 'multipart/related'. This is necessary so Mediator knows how to parse the response properly.
HTTP Connection Timeout
Number. Optional. The time interval (in seconds) after which a connection attempt will timeout. If a value 0 is specified (or if the value is not specified), Mediator will use the value of the global property pg.endpoint.connectionTimeout located in the file Integration Server_directory\packages\Wmsmgiator\config\resources\pg-config.properties (in the Mediator Administration console, go to > Settings > Extended Settings > pg.endpoint.connectionTimeout property.). Default: 30 seconds.
Read Timeout
Number. Optional. The time interval (in seconds) after which a socket read attempt will timeout.
The precedence of the Read Timeout configuration is as follows:
1. If a value is specified for the Read Timeout field in the routing endpoint alias, Mediator will use the value specified in the Runtime Alias > Endpoint Alias > Endpoint Properties > Read Timeout field. The read timeout value defined at an alias level takes precedence over the timeout values defined at an API level and the global configuration.
2. If a value 0 is specified (or if the value is not specified) for the Read Timeout field in the routing endpoint alias, then Mediator will use the value specified in the Read Timeout field of this routing action. The read timeout value defined at an API level takes precedence over the global configuration.
3. If a value 0 is specified (or if the value is not specified) for the Read Timeout field in this routing action (at an API level), then Mediator will use the value of the global property pg.endpoint.readTimeout located in the file Integration Server_directory\packages\Wmsmgiator\config\resources\pg-config.properties (in the Mediator Administration console, go to > Settings > Extended Settings > pg.endpoint.readTimeout property.).
Note:  
If a value for the Read Timeout configuration is not specified in any of the above configuration parameters, then Mediator will use the default 30 seconds.
SSL Configuration
Optional. To enable SSL client authentication that Mediator will use to authenticate incoming requests for the native API, you must specify values for both the Client Certificate Alias field and the IS Keystore Alias field. If you specify a value for only one of these fields, a deployment error will occur.
Note:  
SSL client authentication is optional; you may leave both fields blank.
Prerequisite: You must set up the key alias and keystore properties in the Integration Server. For the procedure, see webMethods Integration Server Administrator’s Guide.
You will use these properties to specify the following fields:
Value
Description
Client Certificate Alias
Mandatory. The client's private key to be used for performing SSL client authentication.
IS Keystore Alias
Mandatory. The keystore alias of the instance of Integration Server on which Mediator is running. This value (along with the value of Client Certificate Alias) will be used for performing SSL client authentication.
WS Security Header
This is applicable only for a SOAP API.
Indicates whether Mediator should pass the WS-Security headers of the incoming requests to the native API.
Value
Description
Remove processed security headers
Default. Removes the security header if it is processed by Mediator (that is, if Mediator processes the header according to the API's security run-time action). Note that Mediator will not remove the security header if both of the following conditions are true: 1) Mediator did not process the security header, and 2) the mustUnderstand attribute of the security header is 0/false).
Pass all security headers
Passes the security header, even if it is processed by Mediator (that is, even if Mediator processes the header according to the API's security action).
Copyright © 2015- 2017 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback