Author |
Message
|
timmy |
Posted: Fri Aug 25, 2006 5:38 am Post subject: Repeat elements in WMQI 2.1 |
|
|
 Novice
Joined: 12 Aug 2002 Posts: 24 Location: Torello
|
Hi,
I'm working on WMQI 2.1 and I'd like to repeat one message set element N times (N from 1 to 10) in a message, but I don't know how.
I define a compound type in the message set with 2 elements: A,B. I'd like to repeat B from 1 to 10 times. In the connection menu of B I set the repeat property as YES, MinOccurs=1 and MaxOccurs=10.
In the OutputRoot I have the correct message, but in the output queue the element only arrives once.
For example, I try to repeat B 2 times. This is the OutputRoot:
(0x1000021)MRM = (
(0x1000000)A = (
(0x3000000)A1 = '01'
(0x3000000)A2 = '100'
)
(0x1000000)B = (
(0x3000000)B1 = 'LOGIN'
(0x3000000)B2 = 'NAME'
)
(0x1000000)B = (
(0x3000000)B1 = 'LOGIN2'
(0x3000000)B2 = 'NAME2'
)
)
The message in the output queue is: 01100LOGINNAME but I'd like the message was: 01100LOGINNAMELOGIN2NAME2
Can anyone help me?
Thanks in advance. |
|
Back to top |
|
 |
special_agent_Queue |
Posted: Fri Aug 25, 2006 5:47 am Post subject: |
|
|
 Centurion
Joined: 27 Jul 2006 Posts: 102
|
Did you declare a repeat reference? Something that identifies to the broker that you are going to repeat? |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 25, 2006 5:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Please don't work on 2.1.
How you instruct the MRM that an element repeats depends on which Physical Model you are using.
Also, there are different behaviors if you include an instance of the Type in the message than if you include an instance of an Element of the Type in the message. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kimbert |
Posted: Fri Aug 25, 2006 8:06 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
This is definitely possible in v6. It might be possible in v2.1, depending on whether my guesses about your TDS model are correct.
You have not told us what your TDS settings are. I'm guessing that you are using Data Element Separation of 'Fixed Length' for the entire message.
I think v2.1 did not allow Fixed Length fields to repeat, but it did allow Tagged Fixed Length fields to repeat. So you may be able to get it working if you change 'Fixed Length' to 'Tagged Fixed Length' on the outermost Compound Type. You will also need to set Tag Length to 0. |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Aug 25, 2006 8:21 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
kimbert wrote: |
You have not told us what your TDS settings are |
We haven't been told if timmy is using TDS or CWF. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
timmy |
Posted: Mon Aug 28, 2006 12:25 am Post subject: |
|
|
 Novice
Joined: 12 Aug 2002 Posts: 24 Location: Torello
|
Thanks for your answers.
Quote: |
Did you declare a repeat reference? Something that identifies to the broker that you are going to repeat? |
Only in the connection menu. How can I declare a repeat reference in other place?
Quote: |
Please don't work on 2.1. |
I'd like to work on 6.0, but it's not my decision...
Quote: |
We haven't been told if timmy is using TDS or CWF. |
I'm using CWF. |
|
Back to top |
|
 |
kimbert |
Posted: Mon Aug 28, 2006 6:04 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Ah
I don't think you'll be able to make 2.1 do what you need. 6.0 would do it just fine.
If you changed to using TDS and Tagged Fixed Length as suggested above, you might get it working. |
|
Back to top |
|
 |
timmy |
Posted: Wed Aug 30, 2006 7:10 am Post subject: |
|
|
 Novice
Joined: 12 Aug 2002 Posts: 24 Location: Torello
|
|
Back to top |
|
 |
|