cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping problem - how to map unbound types to destination???

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Thanks Venkat...

Answers (2)

Answers (2)

Former Member
0 Kudos

>>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

Former Member
0 Kudos

Thanks Aamir...

Former Member
0 Kudos

Hi, I need this urgently....I'll b glad if anyone could help me in this.