|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Setting MaxOccurs for repeating elements in CWF, TDS Formats | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | kali | 
			  
				|  Posted: Fri May 18, 2007 6:24 am    Post subject: Setting MaxOccurs for repeating elements in CWF, TDS Formats |   |  |  
		  | Newbie
 
 
 Joined: 18 May 2007Posts: 1
 
 
 | 
			  
				| Hi, 
 Message Domain : MRM
 Message Format : CWF1
 
 sample input:
 
 Header......
 Detail1....
 Detail2....
 ...
 ...
 DetailN
 
 To parse this sample input what would be the correct value to set in the MaxOccurs Property of the Detail Type?
 
 Tried options
 1. MaxOccurs set to -1, RepeatCount set to 99999
 sample input : HeaderDetail1Detail2Detail3
 
 2. MaxOccurs set to 99999, RepeatCount set to 99999
 sample input : HeaderDetail1Detail2Detail3
 
 Takes all the 3 details present in the input message but with the exception 'ImbRecoverableException caught from worker->parseNext'
 
 The parser expects 99999 details to be present in the input message and after parsing the 3rd, since there is no message to read in the next parse it throws the above exception. Since we could not determine how many details would be present in the input message, we need to set it to infinity. How this is achieved without any exceptions?
 |  |  
		  | Back to top |  |  
		  |  |  
		  | kimbert | 
			  
				|  Posted: Fri May 18, 2007 2:57 pm    Post subject: |   |  |  
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| Tip : it's always helpful to quote the version of message broker which you are using. I'll assume that you're on v6. 
 v6 supports 'repeat to end of bitstream' for CWF when maxOccurs is set to -1. Obviously, the repeating record must be the last thing in the model for that to work.
 
 What is 'RepeatCount'. Is it a field in your header? Are you using it as a repeat count for the Detail record? If so, why are you setting it to '9999'?
 
 
 
  sigh. Parsing exceptions are always much more detailed than that. The system event log will contain the full text of the exception. 
	| Quote: |  
	| Takes all the 3 details present in the input message but with the exception 'ImbRecoverableException caught from worker->parseNext' |  I suspect it is saying that it ran out of bitstream ( because you told it to expect 9999 Detail records ).
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | You cannot post new topics in this forum You cannot reply to topics in this forum
 You cannot edit your posts in this forum
 You cannot delete your posts in this forum
 You cannot vote in polls in this forum
 
 |  |  |  |