Jeff,
None of these structures is valid schema. Could you try your test
again with valid structures?
This is valid:
<element name="MyElement" type="abc:MyType"/>
<complexType name="MyType">
<sequence>
<element ref="abc:MyOtherElement" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
And this is valid:
<element name="MyElement">
<complexType>
<sequence>
<element ref="abc:MyOtherElement" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
Thanks,
Anne
On 12/28/04, Jeff <[EMAIL PROTECTED]> wrote:
>
> Here's a WSDL2Java bug in Axis 1.2 (and 1.2.1)
>
>
> This pattern:
>
> <element name="MyElement" type="abc:MyType"/>
> <complexType name="MyType">
> <sequence>
> <element ref="abc:MyOtherElement" minOccurs="0"
> maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> <element>
>
> causes WSDL2Java to throw:
>
> java.io.IOException: Type
> {http://ay-bee-cee/}MyOtherElement is referenced but not
> defined
>
>
> maxOccurs="unbounded" is causing the problem because this pattern:
>
> <element name="MyElement" type="abc:MyType"/>
> <complexType name="MyType">
> <sequence>
> <element ref="abc:MyOtherElement" minOccurs="0"/>
> </sequence>
> </complexType>
> <element>
>
> does not throw an exception, though it's too far from what I want. I
> discovered, however, that this pattern:
>
>
> <element name="MyElement" type="abc:MyType"/>
> <complexType name="MyType">
> <sequence>
> <element ref="abc:MyUnwantedElement" minOccurs="0"/>
> <element ref="abc:MyOtherElement" minOccurs="0"
> maxOccurs="unbounded"/>
> </sequence>
> </complexType>
> <element>
>
> didn't throw an exception either and it produced code from which I could
> easily remove MyUnwantedElement-related content.
>
>
> Jeff Lawson
>