on 06-14-2008 10:49 AM
Hi All,
I am new to XI, facing a little problem while mapping:
I have a scenario where I need to map from the source Message type:
head - 1..1
itemn - 0..unbound
to a destination Message type:
head - 1..1
item - 1..1
where, if the source message type has the values:
head - HEADER1
itemn- ITEM1
ITEM2
ITEM3
ITEM4
<there could be any number of items here>
A destination message type should be created with the following values:
head - HEADER1
item - ITEM1
head - HEADER1
item - ITEM2
head - HEADER1
item - ITEM3
head - HEADER1
item - ITEM4
The number of nodes here should depend on the number of items in the itemn field (which is unbound. i.e. it can take the values dynimically).
Please help me with this.
Reward points would be awarded.
Hi,
Here you should use use one as many node function.
/people/riyaz.sayyad/blog/2006/04/23/introduction-to-context-handling-in-message-mapping
Here it takes 3 inputs, first field you should map to HEADER1 field, second field you should map to ITEM and third also ITEM.
For full details follow the above blog.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>>The number of nodes here should depend on the number of items in the itemn field (which is unbound. i.e. it can take the values dynimically).
Your receiver side has occurrence 1-1 for both the root node and the child node,since you need to generate the receiver child node as many times as the sender filed occurs,you first need to change the occurence of receiver child node to 0-unbounded and then simply map the field on sender which will occur multiple times to the child node on receiver side.
head - HEADER1
item - ITEM1
head - HEADER1
item - ITEM2
head - HEADER1
item - ITEM3
head - HEADER1
item - ITEM4
Here you are repeating the root node (head) multiple times in the same message structure which is wrong XML,you can't have multiple root node,you need to either repeat the child node.or generate a new message all together for every occurrence of sender field.
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I need this urgently....I'll b glad if anyone could help me in this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.