cancel
Showing results for 
Search instead for 
Did you mean: 

Target Field Mapping error

Former Member
0 Kudos

i am having a source structure like

<a>

<b></b>

<c>

<1></1>

</c>

</a>

and target structure like

<x>

<y></y>

<z>

<9></9>

</z>

</x>

with

1. ofcourse the roots mapped to each other

2. an the element b is mapped to element y

3. element c is mapped to z

4. sub element 1 is mapped to sub element 9.

The minOccurs for c, z, 1 and 9 =0.

However, while execution of this mapping with the source element c missing in the payload a 'Cannot produce target element' error is encountered.

Can any one help find out why is this error being encountered when both the source and target feilds along with their subfields are optional (i.e. with minOccurs=0)?

Accepted Solutions (0)

Answers (3)

Answers (3)

samiullah_qureshi
Active Contributor
0 Kudos

When u select the message types in the message mapping, occurence of the target message(in ur case it is x) will be set to once until or unless u change it in messages tab of message mapping. As u mapped c wid x and c is not available in source, thats y u r getting error that 'Target element cannot be produced'.

Edited by: Samiullah Qureshi on Mar 13, 2010 5:52 PM

Former Member
0 Kudos

ok there seems to be some confusion

my source structure is like

<a>
<b></b>
<c>
<1></1>
</c>
</a>

and target structure is like

<x>
<y></y>
<z>
<9></9>
</z>
</x>

and the mapping is as follows

a is mapped to x

a>b is mapped to x>y

a>c is mapped to x>z

a>c>1 is mapped to x>z>9

and both c and z have cardinatlity 0 to unbounded.

In this case if my source message does not have the element c, its processing leads to the said mapping error.

Edited by: diptee s on Mar 14, 2010 4:51 PM

Former Member
0 Kudos

HI,

The mapping seems to be simple 1:1 mapping. Though you can check the following points...

1. Check if you have mapped the root nodes (top parent nodes) with each other.

2. Check if you have put any condition on root nodes and which is not getting true when you are testing the mapping.

3. Check if you are using the correct test data (if loading the test file from desktop).

Last but not the least, you can also check your mapping just one by one field by disabling all your other fields. By this way you can find at which field or node your mapping is getting failed.

Regards,

Sarvesh

former_member200962
Active Contributor
0 Kudos
and both c and z have cardinatlity 0 to unbounded.
In this case if my source message does not have the element c, its processing leads to the said mapping error.

In case the min occurence is 0 and you are still facing this issue then:

1) If there is any logic applied, then check if the input values are able to satisfy this logic.

2) Redo the mapping....or make some changes to the mapping and save --> activate --> test.

Are you sure that your input payload and cardinality are not causing this issue?

Regards,

Abhishek.

Former Member
0 Kudos

hi

the only problem in my payload is tht the source node c is not present.

however if the cardinality of both c and z is 0 to unbounded, the absence of c should not be leading to a mapping error ryt??

former_member200962
Active Contributor
0 Kudos

When the min occurence of both the source and target nodes is 0, then the error should not occur ideally.

In the error message can you see what node is not getting generated? Did you try recreating the mapping?

Former Member
0 Kudos

thanks abhishek.

recreating the mapping worked.

however, i m still wondering why it did not work in the first place i.e. why it did not work the way it was if the cardinalities of both source and target structures were 0 to unbounded??

former_member200962
Active Contributor
0 Kudos

The main culprit in such cases is CACHE.....and the solution is what you have implemented.....nothing else than that....sometime even making some dummy changes and then again activating helps......this is the case not only with mapping but also with BPM.....you have to re-create the objects.

Regards,

Abhishek.

Former Member
0 Kudos

Thanks a ton Abhishek!!!!!!!!!

Former Member
0 Kudos

i m sorry m not able to award points to your answers...god knowsthe site throws some error

but your answers have really solved the problem , thanks again!!!!!!!!

Edited by: diptee s on Mar 21, 2010 3:36 PM

Former Member
0 Kudos

the source root node a has been mapped to target root node x

<a>
<b></b>
<c>
<1></1>
</c>
</a>

hence the cardinality of x is 1, sry the source structure did not show up properly earlier

Edited by: diptee s on Mar 13, 2010 11:21 AM

former_member204873
Contributor
0 Kudos

What is the cardinality or occurence of X and to what is it mapped?. If it's occurence is 1 then map it to some constant.

Thanks.