Hi chuck, is this a 0.94 issue ? I've done some (significant) changes to the de-ser code lately so things look different now. We handle the min occurs properly. Unfortunately the current code handles sequence properly but not "choice" or "all" (I'll be working on that soon though) I'll fix the codegen issues but I may not be able to apply your patches directly now
Ajith On 3/5/06, Chuck Williams <[EMAIL PROTECTED]> wrote: > Hi Ajith and all, > > I ran into another code generation problem. minOccurs=0 elements are not > supported in the 0 case. I.e., for an optional element that is not present > or a zero-length array, the parsing has bugs. The core serialization in adb > also fails to handle this case. For the parsing (deserialization), the > argumentCount mechanism in the generated parse() methods fails when no > elements for a minOccurs=0 property are present. For serialization, the > next() method in the ADBPullParser fails to handle zero-length arrays as it > assumes that every array-valued property has at least one element. > > Also, I found another bug in the generated parse() methods. If an element > named foo has a subelement also named foo, and especially if the types of > the two foo elements are different (e.g., one is complex and one is simple), > then the parse() method fails. > > I believe these issues are addressed in the attached patches, although they > have only been lightly tested so far. At least all the exceptions are gone > and visual inspection of the serialized and deserialized results seems > correct. I'm sending this now because I know you are working on the code > generator and want to bring these issues to your attention in case you have > not already addressed them. Our project will be heavily testing all of this > in the coming week. > > These fixes overlap with some of my earlier ones, so I can't create > separate patches now. The attached files are consolidated patches to fix > all of these issues: > > > Add support for choice particles > Add support for recursive data types > Add support for minOccurs=0 elements in the 0 case (i.e., where no elements > for the property are present) > Fix bug where a subelement with the same name as its parent element, but > different types, was confused by the parse() methods codgen.patch applies to > modules/codegen/src and adb.patch applies to modules/adb/src, both against > Axis2 0.94 source distribution. > > Chuck > > > -- Ajith Ranabahu
