ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Repeating structures in CWF

Post new topic  Reply to topic
 Repeating structures in CWF « View previous topic :: View next topic » 
Author Message
RB
PostPosted: Tue Jan 23, 2007 12:31 pm    Post subject: Repeating structures in CWF Reply with quote

Acolyte

Joined: 23 May 2006
Posts: 56

I have a message flow with transformation from XML to CWF (copy book structure). I am using MB6

I have a single repeating structure as given below.
Code:


Structure              Type              MinOccurs         MaxOccurs
-------------------------------------------------------------------------
+Detail                Detail             1                       -1



The detail structure could be repeating 'n' times. But I couldn't get a response with n repeating structures. Though I can see in the trace file that it is mapping all the structures, it is always coming as 1.

I even tried to modify the structure to have a finite MaxOccurs value. Eg: I set the MaxOccurs as 3 and send 3 structures in the input XML. I could see from the trace that it is building a message with 3 Detail structures, but once it puts the message to the queue there is only one detail structure.

I tried to modify my structure to have a Header field (or rather a non repeating field) as given below.

Code:


Structure              Type              MinOccurs         MaxOccurs
-------------------------------------------------------------------------
 Header                Header             1                        1
+Detail                Detail             1                       -1



Once I have a non repeating field, I could successfully get 'n' number of repeating structures in the output by setting MaxOccurs = -1.

I have seen couple of postings in the forum about repeating structures not working (with MaxOccurs = -1). But for me it is working fine, if I am adding this non repeating field. I would appreciate if anyone can explain what is the reason for this?

Regards,
rb
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Jan 24, 2007 1:50 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Hi RB,

v6 actually has very good support for this scenario, but there is a defect - and I think you have found it. If the element with maxOccurs=-1 is the only member of its group/complex type then only one occurrence is written. There are two workarounds:

A. Add a dummy element as the first member of the group/complex type. Set minOccurs=0, maxOccurs=0 so that it does not affect the bitstream at all.

B. Add an integer element to the group/complex type. Set its value to the actual number of repeats. Set the 'Repeat Reference' property of the repeating element to point at the integer element.

I think A is simpler.
Back to top
View user's profile Send private message
RB
PostPosted: Wed Jan 24, 2007 7:39 am    Post subject: Reply with quote

Acolyte

Joined: 23 May 2006
Posts: 56

Thanks Kimbert!

I think first solution is better as it is not affecting the bit stream at all.

Regards,
RB
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Repeating structures in CWF
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.