axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Lee <jorda...@shaw.ca>
Subject Axis 1.3: Difficulty generating arrays (maxoccurs = xx)
Date Thu, 16 Mar 2006 23:10:55 GMT
We're seeing some odd behaviour with Axis Java class generation:

When the following complexType definition:

<xsd:complexType name="Parent">
<xsd:sequence>
			<xsd:element name="child" type="ns:Child" minOccurs="0" maxOccurs="6"/>
</xsd:sequence>
<xsd:attribute name="date" type="xsd:date" required="true"/>
</xsd:complexType>

it incorrectly generates the following:
setParent(Child[] child), leaving the user with no way to set 'date'

instead of generating setParent(Parent), with Parent having setChild(Child[] child) and setDate(Date
date)

we found that the following does work:

<xsd:complexType name="Parent">
<xsd:sequence>
			<xsd:element name="child" type="ns:Child" minOccurs="0" maxOccurs="6"/>
	<xsd:element name="date" type="xsd:date"/>
</xsd:sequence>
</xsd:complexType>

Tried this with XMLBeans, which generates the correct code either way. Does anyone know anything
about this?

Jordan.

Mime
View raw message