You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Victor Kazuo Tatai <vi...@softwaredesign.com.br> on 2003/02/19 23:02:05 UTC

WSDL2Java xsd:choice bug?

Hello all,

I'm using WSDL2Java to generate Java to the following WSDL:

(...)
<xsd:element name="X">
	<xsd:complexType>
		<xsd:sequence>
			<xsd:choice>
				<xsd:sequence>
					<xsd:element ref="Y"/>
					<xsd:element ref="Z" minOccurs="0"/>
				</xsd:sequence>
				<xsd:sequence>
					<xsd:element ref="Z"/>
				</xsd:sequence>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>
</xsd:element>
(...)

However, the Java code generated in class X has two Z attributes with 
the same name, and two identical pairs of getter/setter methods, what 
causes the compilation to fail. If I simply remove these extra attribs 
and methods, everything seems to work fine.

I tried searching for a bug on this pbl, but the closest one I could 
find was #14137, which isnt exactly the same thing.

Thanks,

	Victor