users@jaxb.java.net

Re: IllegalArgumentException

From: Riddile Spencer <riddile_spencer_at_BAH.COM>
Date: Tue, 05 Nov 2002 17:35:40 -0500

Zoltan,

Thanks for your input! I looked through the schema I was using and some
of the leaf nodes did not have a defined type. It would make sense that
every element that is a leaf needs to have a type defined in order for
JAXB to give it a java data type when java classes are generated from
the schema.

Spencer

Zoltan Sebestyen wrote:
>
> Hi,
>
> I've got the same exception when I tried to compile an XML schema where an element had no type. Here is the original - simplified - schema:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <xsd:complexType name="XYZ">
> <xsd:sequence>
> <xsd:element name="joe">
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
>
> I had to put change the line
>
> <xsd:element name="joe">
> to
>
> <xsd:element name="joe" type="xsd:string"/>
>
> Regards,
>
> Zoltan