Designer 10.5 | Cloudstreams Development Help | CloudStreams Governance Project | Virtual Services (SOAP) | Routing Rule Step (Content-Based Routing, SOAP Virtual Service)
 
Routing Rule Step (Content-Based Routing, SOAP Virtual Service)
If you have a native service that is hosted at two or more endpoints, you can use the Context-Based routing protocol to route specific types of messages to specific endpoints based on specific values that appear in the request message.
You might use this capability, for example, to determine which operation the consuming application has requested, and route requests for complex operations to an endpoint on a fast machine.
The requests are routed according to the content-based routing rules you create. That is, they are routed based on the successful evaluation of one or more XPath expressions that are constructed utilizing the content of the request payload. For example, a routing rule might allow requests for half of the methods of a particular service to be routed to Service A, and the remaining methods to be routed to Service B.
To configure the Routing Rule step for Content-Based routing:
1. Click the virtual service name in the CloudStreams Governance view.
2. Expand the In Sequence step in the editor.
3. Click Routing Rule and complete the following fields in the Properties view.
Name
You can optionally change the step name from Routing Rule to any other name. There are no naming convention restrictions.
Type
(Read-only field.) Routing Rule.
Protocol
(Read-only field.) HTTP.
Routing Type
Select Content-Based.
Rule Name
Assign a name to the rule.
XPath
Create an XPath expression as follows:
1. Click the icon next to this field to display the XPath Editor.
2. In the XPath Editor that appears, view the Namespace tab, which displays all predefined namespaces. If you want to add custom namespaces, click Add Custom Namespace/prefix, specify a name and value for the namespace, and click OK. To add additional rows, use the plus button at the end of the row to add them.
3. In the XPath Editor's Nodes tab, expand the namespace's node, choose the method you want for the XPath expression, and click OK.
4. In the XPath Editor's Evaluator tab, evaluate the XPath expression by specifying an argument in the XPath Expression field, and clicking Evaluate.
The true/false result of the evaluation is displayed in the Result field.
To specify additional XPath expressions, use the plus button at the end of the row to add them.
Note:
Currently, you cannot define namespace URIs. So the XPath expressions should not include a namespace prefix.
Route To
Specify where to route the request if the rule criteria are met. Specify either the URL of the native service or a connection pool name.
Then, click the icon next to this field and complete the Configure Endpoint Properties dialog box as follows:
*Optimization Method: Select one of the following options:
*None: The default.
*MTOM: Indicates that CloudStreams expects to receive a request with a Message Transmission Optimization Mechanism (MTOM) attachment, and will forward the attachment to the native service.
*SwA: Indicates that CloudStreams expects to receive a SOAP with Attachment (SwA) request, and will forward the attachment to the native service.
Bridging between SwA and MTOM is not supported. If a consumer sends an SwA request, CloudStreams can only forward SwA to the native provider. The same is true for MTOM, and applies to responses received from the native provider. That is, an SwA or MTOM response received by CloudStreams from a native provider will be forwarded to the caller using the same format it received.
When sending SOAP requests that do not contain a MTOM or SWA attachment to a virtual service for a native provider endpoint that returns an MTOM or SWA response, the request's Accept header must be set to multipart/related (or the virtual service's In Sequence step should include an IS service callout that sets the BUILDER_TYPE context variable to multipart/related). This is necessary so CloudStreams knows how to parse the response properly.
*Connection Timeout: The time interval (in seconds) after which a connection attempt will timeout. If a value is not specified (or if the value 0 is specified), CloudStreams will use the default value specified in Integration Server.
*Read Timeout: The time interval (in seconds) after which a socket read attempt will timeout. If a value is not specified (or if the value 0 is specified), the default is 30 seconds.
*SSL Options: To enable SSL client authentication for the endpoint, 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.
SSL client authentication is optional; you may leave both fields blank.
*Client Certificate Alias: The client's private key to be used for performing SSL client authentication.
*IS Keystore Alias: The keystore alias of the instance of Integration Server on which CloudStreams is running. This value (along with the value of Client Certificate Alias) will be used for performing SSL client authentication.
Default To
Enter a native service endpoint to route the request to in case all routing rules evaluate to False. Then, click the icon next to this field and complete the Configure Endpoint Properties dialog box, as described for the Route To field above.
Use credentials from incoming request
Default. Authenticates requests based on the credentials specified in the HTTP header. CloudStreams passes the Authorization header present in the original client request to the native service.
Use specific credentials
Authenticates requests according to the values you specify in the User, Password and Domain fields.
Invoke service anonymously
Does not authenticate requests.
Use existing HTTP headers
Use the HTTP headers that are contained in the requests.
Customize HTTP headers
Use the HTTP headers that you specify in the Name and Value columns on the tab. If you need to specify multiple headers, use the plus button to add rows.
Related Topics
New Virtual Service Wizard (SOAP)
General Properties (SOAP Virtual Service)
Advanced Properties (SOAP Virtual Service)
Entry Step (SOAP Virtual Service)
Transform Step (SOAP Virtual Service)
Invoke IS Service Step (Inbound, SOAP Virtual Service)
Routing Rule Step (Straight Through Routing, SOAP Virtual Service)
Routing Rule Step (Context-Based Routing, SOAP Virtual Service)
Routing Rule Step (Load Balancing Routing, SOAP Virtual Service)
Attach WSDL Dialog Box (SOAP Virtual Service)
Transform Step (Outbound, SOAP Virtual Service)
Invoke IS Service Step (Outbound, SOAP Virtual Service)
Error Messaging Step (SOAP Virtual Service)