cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping of Header Value

Former Member
0 Kudos

Hi,

i have following source structure.

<item>
<header>
<name>test</name>
</header>
<pos>
<id>1</id>
</pos>
<pos>
<id>2</id>
</pos>
<item>
<item>...

and need this target structure.


<item>
<id>1<id>
<name>test</name>
<item>
<item>
<id>2<id>
<name>test</name>
<item>

so i need the same value from header for every pos of one item.

how can i handle that?

regards,

robin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,,

Take constant from down predefined functions options and hard code 2 and map this element to Id element on the receiver side.

Thanks.

Former Member
0 Kudos

well this is only a simple example.

the real structure ist much more complicate.

I cant use fix values.

I need the values from source field. From the position tag. And some from the header tag. But one item can have more positions. So i need to map values from header for every position.

thats my problem.

regards,

robin

prateek
Active Contributor
0 Kudos

Answers (1)

Answers (1)

Former Member
0 Kudos

useOneAsMany will serve your purpose

1st parameter - name

2nd - id(context to root element)

3rd - id(context to node pos)

play around with context..

for useOneAsMany.. check this out

/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii