Skip to Content
author's profile photo Former Member
Former Member

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

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2008 at 11:47 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2008 at 11:22 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 15, 2008 at 04:13 AM

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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.