on ‎2020 Jul 14 11:47 AM
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.
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.