• 2 replies
  • Latest Post - ‏2013-03-15T17:42:28Z by gwing
10 Posts

Pinned topic Results Action Help

‏2013-03-14T17:46:07Z |
This has been discussed on the forum quite a bit and I believe I've read most of them! I think I'm missing something pretty basic. I want to sent an incoming request to a backend service. If the backend service isn't available, try another one. This is on a MPGW.

I used a set variable action to set a context variable (var://context/message/msgout). This is on multiple lines for ease of reading:

<results mode="first-available">

I have set the Results-Action to use this variable as the destination. The logs show:

Mar 14 10:33:20 xb60mgmt TESTmultisteperror mpgw(DanTestMPGW): trans(3486321)requesthttp:// request MultipleDestinations_rule_0 #3 results: 'generated from message_out sent to var://context/message/msgout using HTTP method POST' failed: Error sending to <results mode="first-available"><url></url><url></url></results>.
Mar 14 10:33:21 xb60mgmt TESTmpgwerror mpgw(DanTestMPGW): trans(3486321)errorhttp:// Invalid URL

What am I missing???

Updated on 2013-03-15T17:42:28Z at 2013-03-15T17:42:28Z by gwing
  • HermannSW
    7038 Posts

    Re: Results Action Help

    I did get the same error, because I copied the <results>...</results> into the value part of set-variable action.
    If you look into Probe you will see that DataPower treats that as a String and not as a nodeset.

    Then I used below stylesheet in a NULL-Transform-NULL action and it worked.
    After hitting timeout for 1st url, the response from 2nd url is returned.
    I had to set "Process Messages Whose Body Is Empty" to "on" in advanced tab of XML FW in order to process GET request:
    $ time curl --data-binary 
    "<x/>" http:
    //dp3-l3:2082 <html> This is <b></b>. </html>   real        3m9.015s user   0m0.001s sys    0m0.014s $

    <xsl:stylesheet version=
    "1.0" xmlns:xsl=
    "" xmlns:dp=
    "" extension-element-prefixes=
    "dp" > <xsl:variable name=
    "results">Process Messages Whose Body Is Empty <results mode=
    "first-available"> <url>http:
    //</url> <url>http:
    //</url> </results> </xsl:variable> <xsl:template match=
    "/"> <dp:set-variable name=
    "'var://context/results/remote-multi'" value=
    "$results" /> </xsl:template> </xsl:stylesheet>

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>
  • gwing
    10 Posts

    Re: Results Action Help

    Thanks! The stylesheet did the trick!