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 » reading mqrfh2 header values and set into DataPower

Post new topic  Reply to topic
 reading mqrfh2 header values and set into DataPower « View previous topic :: View next topic » 
Author Message
srk31
PostPosted: Thu Oct 14, 2010 12:53 pm    Post subject: reading mqrfh2 header values and set into DataPower Reply with quote

Apprentice

Joined: 01 Sep 2010
Posts: 39

Hi,
In one of the scenario i have to read mqrfh2 header and take the value of of one the name value pair of usr folder and need to set in the context variables.
I have an mpg defined as MQ FSH and backend also mq. The client drops the msg with rfh2 header. My MQ FSH read the msg and parses the rfh2 header and takes the 'transId' of the usr folder and sets it in the context.

The configuration i have done in the MQ FSH is


Quote:

I have turned on Parse Header to on
Exclude Message Headers -- MQRFH and MQRFH2
content type-- MQRFH2
xpath-- /*[local-name()='MQRFH2']/*[local-name()='NameValueData']/*[local-name()='NameValue']/*[local-name()='usr']/*[local-name()='TransId']



In my processing rule, i have written the xsl, which will take this transId and sets into context variable.
Code:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:dp="http://www.datapower.com/extensions"
  xmlns:date="http://exslt.org/dates-and-times"
  xmlns:exsl="http://exslt.org/common"
  xmlns:dpfunc="http://www.datapower.com/extensions/functions"
  xmlns:dpconfig="http://www.datapower.com/param/config"
  extension-element-prefixes="dp date exsl dpfunc dpconfig"
  exclude-result-prefixes="dp date exsl dpfunc dpconfig">
   <xsl:template match="/">
      <!-- get the MQRFH2 header from the request message -->
      <xsl:variable name="entries"
         select="dp:request-header(’MQRFH2’)" />
      <!-- 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="transId" select="$header//NameValueData/NameValue/usr/TransId" />
      <xsl:variable name="Format" select="$header//Format" />
      <dp:set-variable name="'var://context/txn/msg-transid'"
         value="$transId" />

   </xsl:template>
</xsl:stylesheet>





I am getting error at dp:parse($entries).

var://local/_extension/error string 'dp:parse() error: Incomplete markup or missing document element at offset 0 of *dp:parse*'


Does any one have any clue why its through error?

Thanks,
SRK
Back to top
View user's profile Send private message
srk31
PostPosted: Fri Oct 15, 2010 8:38 am    Post subject: Reply with quote

Apprentice

Joined: 01 Sep 2010
Posts: 39

I got the fix for this.
i was trying to
Quote:

content type-- MQRFH2
xpath-- /*[local-name()='MQRFH2']/*[local-name()='NameValueData']/*[local-name()='NameValue']/*[local-name()='usr']/*[local-name()='TransId']

this is fixing my issue. This xpath expression is setting the TransId value in the service variablevar://service/original-content-type
i am justing reading this one and set it into the context variable.


thanks
SRK
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 » reading mqrfh2 header values and set into DataPower
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.