Call Web Service in Datapower Multiprotocol Gateway

So many time you would like to call a Web Service that receives input from a MQ, File, JMS or HTTP and want to put the result of the Web Service to an different output protocol (MQ, File, JMS or HTTP).

This can be done using an Datapower Mulitprotocol gateway.

Step 1: Setup your front Side and BackSide Handler on your Multi protocol Gateway.

Step 2: Modify your current policy by adding an Transform action after your Match Action that will execute the Web Service SOAP request.

Below is an sample of the Web Service Stylesheet file:

<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl=""

  <xsl:output method="xml"/>

  <xsl:variable name="call">
    <soapenv:Envelope xmlns:soapenv="" xmlns:evt="">
      <xsl:copy-of select="/soap:Envelope/soap:Body"/>

  <xsl:template match="/*">
    <xsl:variable name="result" select='dp:soap-call("", $call)'/>
    <xsl:copy-of select="$call"/>
About to call.
    <xsl:copy-of select="$result/."/>
Done with call


Note: Add your own namespaces to the SOAP Envelope and change the endpoint IP, Port and URI.

6 thoughts on “Call Web Service in Datapower Multiprotocol Gateway

  1. Hi Shreyasma, yes you can call an API as a Web Service from Datapower MPG as long as the your appliance has access to the intranet or internet endpoint.

  2. Hi Michels,
    How to make a call from MPGW service to Webservice proxy in datapower. Here MPGW is common service to check credentials in DMZ and internally i want to implement webservice poxy for soap based webservice.

  3. Hi,

    Can you please advise why do we need to use stylesheet for calling WebServices instead of default backend URL?

    There is an option on MPGW, which we can select request messages type and response message type with the backend URL.

  4. Michels, is it possible that mpgw has a soap facade that does basic schema validation and once that is done it calls the real web services end point. We basically want to transform soap message from one format to another format that is acceptable to the backend web services call. Please advise what is the best way of doing this, thanks in advance

  5. Hi Michels, i have a problem with datapower, im trying to consume a wsdl but adding this service as a reference in visual studio, but i write down all the code and when i get all configuration contracts from wdsl. then i try to get the info consuming datapower i get a 404 not found. the problem is that datapower is configured in other area. im in trouble with ws-proxy and mpgw, is mpgw the way to acomplish this task?(reference service in vs and use object as request)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s