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 Message Broker (ACE) Support » How to Attach Message Set in Java Compute Node ?

Post new topic  Reply to topic
 How to Attach Message Set in Java Compute Node ? « View previous topic :: View next topic » 
Author Message
Ranodip Basu
PostPosted: Thu Oct 26, 2006 4:52 am    Post subject: How to Attach Message Set in Java Compute Node ? Reply with quote

Apprentice

Joined: 23 Sep 2004
Posts: 48

Hi All,

In ESQL Compute node we can specify MessageSet,Type,Format of the output message with respective to a message set as in below,

Quote:
OutputRoot.Properties.MessageSet = 'ABCD12345678';
OutputRoot.Properties.MessageType = 'Output_Message';
OutputRoot.Properties.MessageFormat = 'XML';


In Java Compute Node is there any way to map the output message properties to a message set ? If possible , please let me know how to do that ?

Actually in our current assignment, using Java compute node we need to read message from flat file and create output message structure as defined in a message set.

Thanks & Regards,
Ranodip
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Oct 26, 2006 6:06 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

If you can get the contents of the file into a string, you can use createElementAsLastChildFromBitstream(), specifying the message set, message type and message format as parameters.
Back to top
View user's profile Send private message
hoyski
PostPosted: Wed Sep 05, 2007 4:49 am    Post subject: Reply with quote

Newbie

Joined: 22 May 2007
Posts: 3

(I know this is an old post but I'm hoping to give a little bit back to this forum since it's been so helpful to me.)

I came across this post while struggling with the same issue as the OP.

After a bit of trial and error I came up with the code below to set the MessageType of the output message. In my case both the input and output message types are defined in the same message set so only the MessageType needed to be updated after the headers were copied.

- Dave


Code:

   // Copy the message headers from the input to the output message
   copyMessageHeaders(inMessage, outMessage);
         
   // Change the output message's type
   MbElement propertiesElem = outMessage.getRootElement().getFirstElementByPath("Properties");
         
   if (propertiesElem != null) {
      MbElement msgTypeElem = propertiesElem.getFirstElementByPath("MessageType");
      if (msgTypeElem != null) {
         msgTypeElem.setValue("csv_output_file");
      }
      else {
      propertiesElem.createElementAsLastChild(MbElement.TYPE_NAME_VALUE, "MessageType", "csv_output_file");
      }
   }
[/code]
Back to top
View user's profile Send private message
premji
PostPosted: Tue Jul 16, 2013 3:31 am    Post subject: Regarding MessageSet with JCN Reply with quote

Acolyte

Joined: 01 Jul 2013
Posts: 64

Hi Hoyski

Can you please provide above complete code
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Jul 16, 2013 4:11 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This is a very old thread. The OP was obviously using the MRM domain.
People writing new message flows will probably be using DFDL, not MRM.

I suggest that you
- think carefully about what you are trying to do, and why
- if you cannot see how to solve the problem then open a new thread, and carefully explain what your problem is.
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 Message Broker (ACE) Support » How to Attach Message Set in Java Compute Node ?
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.