Author |
Message
|
munna123 |
Posted: Sun Jul 04, 2010 10:29 am Post subject: how to assign MQMD PutDate value to the output field in XSLT |
|
|
Newbie
Joined: 18 Apr 2010 Posts: 7
|
HI,
The xsl which i use is
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dp="http://www.datapower.com/extensions" extension-element-prefixes="dp" exclude-result-prefixes="dp">
<xsl:output method="xml"/>
<xsl:template match="/">
<!-- get the MQMD header from the request message -->
<xsl:variable name="entries" select="dp:request-header('MQMD')"/>
<!-- parse into a usable nodeset -->
<xsl:variable name="header" select="dp:parse($entries)"/>
<!-- store the desired values in a variable available for later -->
<xsl:variable name="RQ" select="$header//ReplyToQ"/>
<xsl:variable name="RQMgr" select="$header//ReplyToQMgr"/>
<xsl:variable name="MsgId" select="$header//MsgId"/>
<xsl:variable name="PutDate" select="$header//PutDate"/>
<!--<dp:set-variable name="’var://context/MYMQMD/ReplyToQ’" value="$RQ"/>
<dp:set-variable name="’var://context/MYMQMD/ReplyToQMgr’" value="$RQMgr"/>
<dp:set-variable name="’var://context/MYMQMD/MsgId’" value="$MsgId"/>-->
<xsl-Message>
<xsl:value-of select="'$PutDate'"/>
</xsl-Message>
<!--<xsl:message>
<xsl:value-of select="concat ('MQMD with Original Request MQMD : ', dp:request-header('MQMD'))"/>
</xsl:message>-->
</xsl:template>
</xsl:stylesheet>...
The output in ALTOVA SPY IS <?xml version="1.0" encoding="UTF-8"?><xsl-Message>$PutDate</xsl-Message>.............
when i use this xsl in the WMB...i am getting error can anyone helpme on this... The output should be MQMD Putdate time eg: <xsl-Message>2010-04-08</xsl-Message>.............
.. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Jul 04, 2010 11:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Moving to DataPower _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqjeff |
Posted: Sun Jul 04, 2010 6:45 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
fjb_saper wrote: |
Moving to DataPower |
Well, I agree with this based on
Quote: |
xmlns:dp="http://www.datapower.com/extensions" |
But then I'm doubly-confused by
Quote: |
when i use this xsl in the WMB... |
munna123 - think twice about what you're trying to do. And then *explain* it, very very carefully. |
|
Back to top |
|
 |
munna123 |
Posted: Mon Jul 05, 2010 12:38 am Post subject: how to assign MQMD PutDate value to the output field in XSLT |
|
|
Newbie
Joined: 18 Apr 2010 Posts: 7
|
i have a same dout when i can use this xsl in wmb...
Moved to datapower means..when the flow is simple like one mqinput node and xslt node and mqoutput node...will this xsl works.
or still any configutations needs to be done...because when i tesed the flow i am not getting any mqmd value in the output...and the tranformation is getting failed...how this service datapower will be used in the xslt |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Jul 05, 2010 6:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As far as I understand this is for exclusive use with a DataPower appliance.
When you use XSLT with the message broker the XSLT transform AFAIK applies only to the body of the message. MQMD is not part of the body and as such you need to use other means of enriching the body with this information.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
munna123 |
Posted: Mon Jul 05, 2010 9:51 pm Post subject: how to assign MQMD PutDate value to the output field in XSLT |
|
|
Newbie
Joined: 18 Apr 2010 Posts: 7
|
hi,
As you explain that we need to use other means of enriching the body with this information. what does it mean we have to use compute node to acees the value...Is it not possible to access in xslt the mqmd value in wmb? |
|
Back to top |
|
 |
|