How to generate/ extract RFH2 Header in usr folder of a MQ Message.
The main moto of this blog is which explains about to genaration of RFH2 header in MQ message,as we all know that MQ message has header and payload format,but some times client required extra header information in MQ message,the extra header info we called RFH2 header in MQ message format.
Recently I worked for one of big pharma client; my client has a specific requirement to generate /extract RFH2 header information in USR folder of MQ message.
The solution as follows..
Create JMS communication channel
1) In Adapter Specific Message Attributes under the “Advanced” tab, use the table to enter your property names into the table (up to 10).
2. Click on the “Module” tab of the communication channel.
3. In the processing sequence, add a new module called
“AF_Modules/DynamicConfigurationBean” type “Local Enterprise Bean” module key “RFHHEADER”.
If you want to extract RFH2 header information from usr folder then mention read instead of insert/write.
4. You can now enter name value pairs in the module configuration table see above for instance, if you want to assign a value of “TEST” to a property called “Source Scheme” (created in step 1, and first entry in table), then the configuration would be as follows: Module Key Parameter Name Parameter Value
DynamicConfiguration conf = (DynamicConfiguration) container .getTransformationParameters ().get(StreamTransformationConstants.
DYNAMIC_CONFIGURATION); DynamicConfigurationKey key =DynamicConfigurationKey.create (“http://sap.com/xi/XI/System/JMS“,”DCJMSMessageProperty6 <</strong>http://sap.com/xi/XI/System/JMS%22,%22DCJMSMessageProperty6>“);
The limitation here is we can add up to only 10 attributes. if you want to add more than 10 attributes ,
Finaly It creates a RFH2 with values wrapped in the /usr folder of a WebsphereMQ message. Check in MQ.