cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

weird structure to map

Former Member
0 Likes
1,520

Hello.

Currently I'm facing a weird structure to map, source is a well defined xml data object but target structure is weirdly de-coupled and I'm not sure how to solve it via message mapping. I was asked to avoid java mapping usage, so I have to try to make it work with message mapping.

Source structure is something like this:

As you can see is a normal well defined xml data object with two header fields acting like a primary key.

Target structure would be:

It is like it was defined as relational tables where struct acts as a header table and substruct is another table referencing struct by the composite primary key. Items are like registries in the tables. I know is weird but it is the requirement.

I have tried several combinations of functions remove context, use one as many and split by value but none of them seems to get the desired result.

Thanks in advance for any help the community can offer.

View Entire Topic
former_member190293
Active Contributor

Hi Juan!

Something like this (just template):

Regards, Evgeniy.

Former Member

Evgeniy you are the man of the day. You nailed it!

The trick was to change the context of substructure to use the root context, not the parent. You won't believe me but I was thinking about toying with this next in my tests.

It works like a charm. I did several tests duplicating the structures and substructures a random number of times and the target document was build correctly without missing any information.