ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere DataPower » how to assign MQMD PutDate value to the output field in XSLT

Post new topic  Reply to topic
 how to assign MQMD PutDate value to the output field in XSLT « View previous topic :: View next topic » 
Author Message
munna123
PostPosted: Sun Jul 04, 2010 10:29 am    Post subject: how to assign MQMD PutDate value to the output field in XSLT Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Sun Jul 04, 2010 11:47 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

Moving to DataPower
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Sun Jul 04, 2010 6:45 pm    Post subject: Reply with quote

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
View user's profile Send private message
munna123
PostPosted: Mon Jul 05, 2010 12:38 am    Post subject: how to assign MQMD PutDate value to the output field in XSLT Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 05, 2010 6:35 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
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
View user's profile Send private message Send e-mail
munna123
PostPosted: Mon Jul 05, 2010 9:51 pm    Post subject: how to assign MQMD PutDate value to the output field in XSLT Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere DataPower » how to assign MQMD PutDate value to the output field in XSLT
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.