Adding JMS or MQ/JMS Custom Header Attributes
If you need to add a custom header to your JMS (default messaging) or MQ/JMS message in WebSphere , you have two options. You can specify it as a custom header on the import component in the assembly diagram, or you can use a Medation Module.
You can add the custom header property in the assembly diagram by: Clicking the MQ/JMS Import Component. Click the Method binding in the propreties view. Scroll to the Custom Header table and add the name/value pair. It should be noted that you can only do this for static values. If you need to assign the value of your custom property based on the data from your Business Object, you MUST use a Mediation Flow. Sadly, the ‘Value’ column is not an XPATH expression like it should be.

To do this in a mediation module, you do your normal modification of the /header, nothing special.
Related Posts
- Business Object Maps and ‘Required’ Attributes
- JMS Function Selectors & Method Bindings
- SCA, BPEL, Websphere Adapter for JDBC and Transactionality
- WebSphere Integration Developer: Struggling with the Business Object Mapper
- My Integration Test Client DeveloperWorks Article
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

October 23rd, 2008 at 4:33 pm
Dan,
Can you add Custom Headers in Soap over JMS ?
If so, where can I find an example about this.
I like to use it, to filter out published messages, post to a topic?
Regards,
Bernard
October 23rd, 2008 at 10:17 pm
Hi Bernard,
In my humblest of humble opinions, SOAP/JMS support is flaky at best and you’d be far better off staying away from it and using JMS Text messages.