Question

Well I am quite new to datapower(IBM Websphere xi50) and i have got struck as to how to route dynamically.Suppose we have configured dynamic backend then a client asks for some service so how to route it .

Is it through XSLT or yhrough certain policy creation I am not getting any clear idea regarding it?

Thanks

Was it helpful?

Solution 3

You can do it through XSLT . The steps to do it is as following (logically)

Step 1: Determine the criteria based on which you want routing [it could be URI or any part of message] Step 2: Use datapower built in function dp:open-url to send traffic to target.
Step 3: Get the response and process it.

There are other ways to do it as well but this is the most straight forward way.

OTHER TIPS

Normally you use "var://service/routing-url" and not as Ajitabh answered "dp:url-open".

You can also use the "Set variable" action instead of XSLT.

dp:url-open is used to "fork" a message, not to route it. If you use dp:url-opento route you must also set "skip-backside = 1"!

See sample for XSLT:

<xsl:variable name="destURL" select="concat('http://127.0.0.1:',$Transformer-port,'/', $usrTransformer)" />
<!-- Set backend URL -->
<dp:set-variable name="'var://service/routing-url'" value="$destURL" />

I create an XSLT that looks at the different elements in the incoming message to help determine the destination. I then invoked the DataPower extension method <dp:set-variable('var://service/routing-url') select="yourUrlHere"/>. I put that XSLT into a routing action.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top