You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Dennis Cartier <de...@canadianblackbook.com> on 2004/12/16 20:25:13 UTC

Possible bug in JaxMe class generation?

Hello,

I have run into a scenario trying to help a customer use JaxMe with a schema
that I normally use under JAXB. It seems like JaxMe is not honoring nested
choices or perhaps sequences within choices when generating classes. At
least, that is my interpretation of the problem. When compiling the schema,
it fails with the message:

Caused by: java.lang.IllegalStateException: The class
com.blkbk.xml.xmlwebservices.impl.VehicleRequestImpl already has a field
Year.

the specific section of the schema it is failing on is:

    <xs:complexType name="VehicleRequest">
        <xs:choice>
            <xs:sequence>
                <xs:choice>
                    <xs:element name="Year" type="cbb:intYear"/>
                    <xs:element name="VINYear" type="cbb:VINYear"/>
                </xs:choice>
                <xs:choice>
                    <xs:sequence>
                        <xs:element name="Make" type="cbb:string15"/>
                        <xs:element name="Model" type="cbb:string20"/>
                        <xs:element name="Series" type="cbb:string20"/>
                        <xs:element name="BodyStyle" type="cbb:string30"/>
                    </xs:sequence>
                    <xs:sequence>
                        <xs:element name="MakeID" type="cbb:ID"/>
                        <xs:element name="ModelID" type="cbb:ID"/>
                        <xs:element name="SeriesID" type="cbb:ID"/>
                        <xs:element name="BodyStyleID" type="cbb:ID"/>
                    </xs:sequence>
                </xs:choice>
            </xs:sequence>
            <xs:sequence>
                <xs:element name="VIN" type="cbb:VIN"/>
                <xs:choice>
                    <xs:element name="Year" type="cbb:intYear"/>
                    <xs:element name="VINYear" type="cbb:VINYear"/>
                </xs:choice>
            </xs:sequence>
            <xs:sequence>
                <xs:element name="VID" type="cbb:VID"/>
            </xs:sequence>
            <xs:sequence>
                <xs:element name="UVC" type="cbb:UVC"/>
                <xs:element name="ManufacturerCode"
type="cbb:ManufacturerCode"/>
                <xs:choice>
                    <xs:element name="Year" type="cbb:intYear"/>
                    <xs:element name="VINYear" type="cbb:VINYear"/>
                </xs:choice>
            </xs:sequence>
        </xs:choice>
    </xs:complexType>

I can post the whole stacktrace from the build, and the complete schema if
it is helpful. I did not want to generate too much noise on the list.

Thanks,

Dennis

-------------------------------------------------
Dennis Cartier
Manager of Information Systems

Canadian Black Book
7800 Woodbine Ave. Ste. 302
Markham, Ontario
L3R 2N7

Telephone:   905-477-0343  Ext. 228
Toll Free:       1-800-562-3150

www.canadianblackbook.com
-------------------------------------------------

-- When you have a golden hammer, everything starts to look like a nail.



---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: Possible bug in JaxMe class generation?

Posted by Jochen Wiedmann <jo...@apache.org>.
Dennis Cartier wrote:

> It seems like JaxMe is not honoring nested
> choices or perhaps sequences within choices when generating classes.

Unfortunately, you are simply right: See

     http://nagoya.apache.org/jira/browse/JAXME-28


Jochen


---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org