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 » dynamic message creation according to output MsgSet

Post new topic  Reply to topic
 dynamic message creation according to output MsgSet « View previous topic :: View next topic » 
Author Message
jurop
PostPosted: Wed Oct 10, 2007 6:22 am    Post subject: dynamic message creation according to output MsgSet Reply with quote

Novice

Joined: 17 Oct 2005
Posts: 13
Location: Slovakia

Hi all, do you have any idea how to solve following problem:

We have input xml MessageSet1 with elements:
element1, element2 .. element15

Output xml MessageSet2 with elements:
element1, element2 .. element10

The element names from MessageSet2 are the same as in MessageSet1, MessageSet2 is subset of MessageSet1.

MsgSet1--> Flow --> MsgSet2

How to create output message generaly, when we do not want to name elements directly in ESQL (we have a lot of such a situations, so we would like to solve it generaly). We need to go through MsgSet2 elements and look for such an elements in MsgSet1.
How could we go through all output MessageSet elements?
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Oct 10, 2007 6:48 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Use a Mapping node.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jurop
PostPosted: Thu Oct 11, 2007 1:01 am    Post subject: Reply with quote

Novice

Joined: 17 Oct 2005
Posts: 13
Location: Slovakia

Thanks a lot for a quick answer.
The problem is that I do not know exactly the MsgSet1. (you can imagine that MsgSet1 is sequence of xsd:any). I know only MsgSet2.
I want to create output message matching the MsgSet2 and fill its elements from input message, if they are included in input message with the same name.
This is what I want to do for many MsgSets2, so I'm looking for general way how to do it.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Oct 11, 2007 2:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The only possible way to do this is to create a fully formed, but empty, message from message set 2.

Then loop over the fields in Msg2 and use the fieldname to get the same named field in the input message (based on MsgSetX) and set the value into the output message.

Your requirements, by the way, are completely ridiculous. There's absolutely no good reason that a random message that shows up on an input queue that happens to have a field called "AccountID" (for example) will in ANY WAY have the same business meaning as the field called "AccountID" in your output message.

And then there's the whole question of what if there are TWO fields called "AccountID" in the input message, and only ONE field on the output message.
_________________
I am *not* the model of the modern major general.
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 » dynamic message creation according to output MsgSet
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.