cancel
Showing results for 
Search instead for 
Did you mean: 

cardinality

Former Member
0 Kudos

In mapping if source element has one element and if there are 3 occurrences for target element, what might have happened?

a) At Sender set Minoccurs = 3.

b) At sender set maxoccurs = 3.

c At sender set Minoccurs=Maxoccurs=3

d) Receiver set minoccurs = 3.

d) Receiver set maxoccurs = 3.

f) At Receiver set Minoccurs=Maxoccurs=3

thanks

kumar

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Kumar,

The answer can be either d,e,f

Best regards,

raj.

Former Member
0 Kudos

Hi raj,

apart from the above question.............can we achieve the same result with the following combination ??

source: minoccurs 3

and target: 0 to oubound

thanks

kumar

Former Member
0 Kudos

Kumar,

If source: minoccurs 3 then you should have the source as 3 times which in your question above should be only 1.

and target: 0 to oubound --- With this you are specifying that the target can be existing or will not exist. But in this case since your source will definitely occur (assuming source as 1 or 3) then it is correct.

---Satish

Former Member
0 Kudos

Hi raj,

talking to your first answer as you said either of d, e,f ...........suppose if source message occuring only once. then how can you get 3 target messages ?? even you put either of d, e, f .......for d ( mapping error occurs as source is occuring only once), e (only one message occurs as source is occuring only once), f(again mapping error occurs as source is occuring only once).

I believe first answer(a) is the right bet as irrespective of target message occurence you are sure to get 3 messages.

Please correct me if I am wrong.

thanks

kumar

Former Member
0 Kudos

You are right kumar.

---Satish

Former Member
0 Kudos

Hi satish,

you are mistaken. I have told one source element, I didn't talk abt no of source messages

thanks

kumar

justin_santhanam
Active Contributor
0 Kudos

Kumar,

Why you will get mapping error, if source element is 1 is it not possible for me to get 3 target elements?

Do you remember the other thread where i asked you to duplicate the target node, apply the same u will get the results.

Best regards,

raj.

justin_santhanam
Active Contributor
0 Kudos

Kumar,

Please correct me if my understanding abt ur problem is wrong. As you said

<i><b> Source</b></i>

<Node>

<element>Test</element>

<Node>

<i><b>Target</b></i>

<Node>

<element1>Test</element1>

<element2>Test</element2>

<element3>Test</element3>

</Node>

The above is ur question am I right? If you get the target as this what could be the occurrences? Now apply answer d,e,f for it and lemme know.

Best regards,

raj.

Message was edited by:

Raj

Former Member
0 Kudos

Hi raj,

If it is the case ...........in the samelines if I declare target elements occurence as 0 to unbound........whether I will get unbound messages ?? ( I mean n number of messages )

thanks

kumar

justin_santhanam
Active Contributor
0 Kudos

Kumar,

Yes kumar , u will get unbound messages, but it depends on how much time your source element has been mapped.

To be more clear, see the cardinality which u specified is an property(attribute) that particular element can be present in my XML or not or how much time it has to be repeated.

But its our mapping logic responsibility to generate that many elements in target structure, am I right?

I hope it clears your doubt.

Best regards,

raj.

Message was edited by:

Raj

Former Member
0 Kudos

Hi raj !

I am sorry ! I am failed to understand what you mean. But your understanding of my problem is correct. I was testing in the mapping editor by creating the combinations that you mentioned (d, e, f). I am able to get 3 target messages (tags) only when minoccurs is 3 (d)and minoccurs=maxoccurs=3 (f). when I used the option 'e' I was able to get only one message (tag) in the output.

thanks

kumar

justin_santhanam
Active Contributor
0 Kudos

Kumar,

I'm really sorry that I couldn't able to deliver my thoughts.

When u used option <b>e</b> , did u duplicated the target element 3 times. Try the option and let me know.

Best regards,

raj.

Former Member
0 Kudos

Hi raj !

For option 'e' maxoccur is 3. so for minoccurs what value i should choose ?? I have tried by taking 0, 1. In both the case of gave got only one tag as expected. if take minoccurs also 3 then the test will become as option 'f'.

In your thoughts how should i test this option 'e' ? I mean what should i take for minoccurs and maxoccurs ?

thanks

kumar

justin_santhanam
Active Contributor
0 Kudos

Kumar,

If you want the target element to be repeated thrice, then max occurs - 3

min occurs can be 0 (or) 1 (or) 2, even u can give 3 but it will be same as option <b>f</b>, but don't forget to duplicate the target element thrice and map that single source element individually to the target(In this case since you've duplicated 3 times you have to map all the duplicated element)

If not clear , reply back.

Best regards,

raj

Message was edited by:

Raj

Former Member
0 Kudos

Hi raj!

thanks for your reply! Here is the catch.......come to know where I am missing. In case of d and f I didn't duplicated and still getting the target messages 3 times in the mapping test editor. In my problem I am not supposed to do the duplication of elements.

thanks

kumar

justin_santhanam
Active Contributor
0 Kudos

Kumar,

Can you please give me the sample structure.

Best regards,

raj.

Answers (1)

Answers (1)

Former Member
0 Kudos

Kumar,

At sender it should be Minoccurs=Maxoccurs=1 i.e, 1..1

and at receiver it should be Minoccurs=Maxoccurs=3 i.e, 3..3.

---Satish