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 » Mapping Node, Creating a field at target

Post new topic  Reply to topic
 Mapping Node, Creating a field at target « View previous topic :: View next topic » 
Author Message
darring
PostPosted: Tue Sep 16, 2008 12:09 am    Post subject: Mapping Node, Creating a field at target Reply with quote

Apprentice

Joined: 14 Jun 2008
Posts: 36

Hi,
I am using Mapping Node to create a target message from a source message. I need to create a field at target side(corresponding field is not present at source) and populate with some value. Can anybody please help me to do that? I am new to mapping node.

Regards
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Sep 16, 2008 3:28 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Yes, it's easy.

Just create a target field.

And then set it's expression to the value you need to populate it with.

There is no step 3.
Back to top
View user's profile Send private message
darring
PostPosted: Tue Sep 16, 2008 8:03 am    Post subject: Mappin Node Issue Reply with quote

Apprentice

Joined: 14 Jun 2008
Posts: 36

First my appolgy for not making the statement clear. The scenario is, in my source a particular element/complex type
may occur anywhere between 1 to 3. I will map all of them to target. But in case the source is less than 3, I need to
create exactlt 3 occurences at the target. Let's consider the example below, for each Request at source I need to create
a Response at target.RequestId is mapped to ResponseId and RequestVal is mapped to ResponseVal and I create an element
DummyResponse and populate the value as well.I have managed to make it work when there are 3 Request in my Source but
couldn't manage when number of Request in my Source is less than 3.

Source:
<?xml version="1.0" encoding="UTF-8"?>
<SourceMessage>
<Request>
<RequestId>1</RequestId>
<RequestVal>RequestInValue 1</RequestVal>
</Request>
</SourceMessage>

Target:

<?xml version="1.0" encoding="UTF-8"?>
<TargetMessage>
<Response>
<ResponseId>1</ResponseId>
<ResponseVal>RequestInValue 1</ResponseVal>
<DummyResponse>Dummy Response Value </DummyResponse>
</Response>
<Response>
<ResponseId>2</ResponseId>
<ResponseVal>RequestInValue 2</ResponseVal>
<DummyResponse>Dummy Response Value </DummyResponse>
</Response>
<Response>
<ResponseId>3</ResponseId>
<ResponseVal>RequestInValue 3</ResponseVal>
<DummyResponse>Dummy Response Value </DummyResponse>
</Response>
</TargetMessage>

Thanks In Advance
Back to top
View user's profile Send private message
sridhsri
PostPosted: Tue Sep 16, 2008 12:16 pm    Post subject: Reply with quote

Master

Joined: 19 Jun 2008
Posts: 297

As far as I know the 'for' loop in mapping only works on the occurrence of incoming elements.

You might have to use a combination of mapping and calling ESQL from mapping (to create the dummy elements).
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 » Mapping Node, Creating a field at target
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.