cancel
Showing results for 
Search instead for 
Did you mean: 

help in graphical mapping needed

Former Member
0 Kudos

Hi,

i have a graphical mapping where the scenario is that in input we have the following structure

header0

header1----


occurances 1-unbounded

header2----


occurances 1-2

in the output i have to get the below structure

header0

header1----


occurances 1-unbounded

|--header2---occurances 1-2

So i have done a one onone mapping

if my inp xml is like the one given below it works

<header0>

<value1>099</value>

</header0>

<header1>

<value1>09</value>

</header1>

<header2>

<value1>hjjd</value>

</header2>

<header2>

<value1>094f9</value>

</header2>

But if the input is like the one given below its not working

<header0>

<value1>099</value>

</header0>

<header1>

<value1>09</value>

</header1>

<header2>

<value1>hjjd</value>

</header2>

<header2>

<value1>094f9</value>

</header2>

<header1>

<value1>09769</value>

</header1>

<header2>

<value1>09469</value>

</header2>

i.e., if header1 repeats its not working can anyone help me in this issue

Thanks in advance,

Bhargav.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hey Rajeev,

i had activated it and i can also see that in my message mapping.but still its not working.

Hey raj,

As suggested by you i have used splitbyvalue in between header1 in source and header1 in target than the output that was generated is diferrent from that i wanted.The output it generated is

<header0>

<value1>099</value>

</header0>

<header1>

<value1>09</value>

</header1>

<header2>

<value1>hjjd</value>

</header2>

<header2>

<value1>094f9</value>

</header2>

<header2>

<value1>09469</value>

</header2>

but the actual output to be generated should be as gievn in the topmost post.here the header2 under the second header1 is coming under the first header1 only and the second ocurance of header1 is not replicating in the output.

Thanks,

Bhargav

Former Member
0 Kudos

Hi Bhargav,

see since header1 and header2 are not related to eachother, so by graphical mappiing you will not be able to generate the replica of source msg.........for this i suggst a workaround to you........see your source msg and target msg struc are same, so you dont need any mapping between them.......just create 1 data type, 1 msg type and 2 msg interfaces - outbound and inbound.......both these will have same msg type and that msg type will have that data type......dont create any interface mapping in IR.......In id, in receiver determination, you will not have any interface mapping....activate everything in IR and ID.......rerun your scenario....then you will get your target file as a replica of source file.........

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Hey Rajeev,

I have changed the occurances of both to 1-unbounded but still it is howing the following error :

Cannot produce target element /ns0:mt_receiver/header1[2]/header2. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd

As suggested by you i placed the xml in the test tab and saw the tree representation it is working fine

Thanks,

Bhargav

Message was edited by:

bhargav gundabolu

Former Member
0 Kudos

Hi Bhargav,

after changing the occurance, save and activate the data type........then see in msg mapping you should see the occurances changed in both source and target msg types as 1..unbounded..........Then again test your mapping in msg mapping test tab..........now your mapping should work.........

Thanks,

Rajeev Gupta

Former Member
0 Kudos

Im sorry my mistake it is header1 only.

Thanks,

Bhargav

Former Member
0 Kudos

Hi Bhargav,

have you done what i have said above to change the occurance of both header1 and header2 ?.......if not, then do it........if you have done this, still you are getting mapping error, then paste your source xml from msg mapping test tab........just check when you put your this xml data in source msg, then are you able to see the graphical display of source msg in heirarchical tree form in msg mapping test tab in IR.....

Thanks,

Rajeev Gupta

Message was edited by:

RAJEEV GUPTA

justin_santhanam
Active Contributor
0 Kudos

Bhargav,

U have mapped Header 0 -


Header 0 and values also , its fine.

Simlialrly Header 2 -


Header 2 with Values , its fine.

<b>Header1</b>

Header 1 -


>SplitByvalue------> Header1.

Values------>Values

Try this and let me know

Best regards,

raj.

Former Member
0 Kudos

Hi,

I have changed the occurances of header6 to i-unbounded.But it is still throwing an error stating that End tag header1 does ot match to start tag

Thanks,

bhargav

justin_santhanam
Active Contributor
0 Kudos

Bhargav,

Give the exact source and target structure u needed. In the above reply u've given as Header6.

Can u please clarify it.

Best regards,

raj.

Former Member
0 Kudos

Hi Bhargav,

i think when you are giving your second source file, then your header1 will be coming but header2 which is below header 1 is not coming................the reason for this is that for both source and target for header2 you have given cardinality as 1..2 so only 2 occurances of header2 are allowed in source file.........

Thanks,

Rajeev Gupta