0

I want to implement a MPG service in Datapower with Request Type and Response type as Passthrough, with static end point its fine. Can I handle the same Dynamically.

Created a Policy with Request rule having a result action and a transform action having the dynamic routing logic, with input and output type as NULL. But not able to route. Any suggestion?

2 Answers2

2

As bjimba says will the Passthrough mode prevent any processing of the data/meta-data to happen. This is per design and to make sure data passes through "untouched". Passthrough does not give any performance gain or other benefits (use streaming instead for performance gain).

To be able to dynamically route you have to change the Service variable "routing-url":

XSLT: <dp:set-variable name="var://service/routing-url" value="'protocol://target/URI'" /> (Note the single quotes)

GatewayScript: serviceVars.setVar('var://service/routing-url', 'protocol://target/URI'); or serviceVars.routingUrl = 'protocol://target/URI';

If you seek performance gain make sure your Stylesheet Action (XSLT or GWS) use Input and Output as NULL and add a Result Action with Input: INPUT and then set your MPGW to Streaming mode.

Anders
  • 3,198
  • 1
  • 20
  • 43
0

Passthrough mode won't run request rules. That's why they call it "passthrough". Change it to XML mode.

bjimba
  • 928
  • 8
  • 13