on 03-13-2010 7:32 AM
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)?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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.
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.