Hello,
 
We are using the source code generator to generate POJOs from XML
schema, with Castor 1.0M4.  We set the "type" flag on the generator to
"j2", and the following properties:

        org.exolab.castor.builder.javaVersion = 5.0
        org.exolab.castor.builder.javaclassmapping = type
        org.exolab.castor.builder.primitivetowrapper = true
        org.exolab.castor.builder.extraCollectionMethods = true
        org.exolab.castor.builder.collections.reference.suffix = List
 
I am running into problems with the collection methods themselves.
Let's say I define a collection of widgets in the XSD:

        <xs:complexType name="GenClass">
          <xs:complexContent>
            <xs:extension base="BaseGen">
              <xs:sequence>
                <xs:element name="widgets" type="Widget" minOccurs="0"
                            maxOccurs="unbounded" />
              </xs:sequence>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>

This results in three setters:

        public void setWidgets(Widget[] vWidgetsArray)
        public void setWidgets(java.util.List<Widget> vWidgetsList)
        public void setWidgetsList(java.util.Vector<Widget>
WidgetsVector)

Previously, these setters were generated:

        public void setWidgets(Widget[] WidgetsArray)
        public void setWidgets(java.util.List widgetsCollection)
        public void setWidgetsList(java.util.List widgetsCollection)

The issue is with setWidgetsList().  Because I set the "types" flag to
"j2", I would expect that method to take a List, rather than a Vector,
as it did with 1.0M4.  Am I doing something wrong, have I encountered a
bug, or is that the expected behavior?  If it's the latter, is there any
way to get the generator to create the method signature I need?

Thanks,
Dhruva

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to