|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Mapping Node, Creating a field at target |
« View previous topic :: View next topic » |
Author |
Message
|
darring |
Posted: Tue Sep 16, 2008 12:09 am Post subject: Mapping Node, Creating a field at target |
|
|
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 |
|
 |
mqjeff |
Posted: Tue Sep 16, 2008 3:28 am Post subject: |
|
|
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 |
|
 |
darring |
Posted: Tue Sep 16, 2008 8:03 am Post subject: Mappin Node Issue |
|
|
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 |
|
 |
sridhsri |
Posted: Tue Sep 16, 2008 12:16 pm Post subject: |
|
|
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 |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|