users@jaxb.java.net

moving from JAXB beta to final release

From: Les Hazlewood <les_at_hazlewood.com>
Date: Thu, 08 May 2003 00:53:42 +0100

Hello,

I had used Jaxb beta when designing a schema and, for the most part, had it
do everything I needed.

Now, in using the 1.0 final release that comes with the JWSDP 1.1, xjc no
longer compiles my schema, and I was wondering if someone could shed a light
on why.

I have defined the xml document starting with the following namespace
declarations (the JAXB annotations are in the file, not in an external
binding document):

<schema targetNamespace="http://dewdrop.sourceforge.net/xmlns/database_1_0"
       xmlns:dddb="http://dewdrop.sourceforge.net/xmlns/database_1_0"

xmlns:rdbms="http://dewdrop.sourceforge.net/xmlns/rdbms/1_0_0/rdbms.xsd"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns="http://www.w3.org/2001/XMLSchema"
       xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
       jaxb:version="1.0"
       elementFormDefault="qualified"
       attributeFormDefault="unqualified">

This worked fine before, and is valid xsd syntax.

What this declaration does, is allow me to define my xsd elements without
prefixing xsd: to everything since the default element namespace is that for
XSD.

So, here is a bit of code that generates an error when using xjc (the line
number is marked where the error is occurring):

<element name="primaryKey">
       <complexType>
           <sequence>
               <element ref="dddb:columnRef"
                        minOccurs="1"
                        maxOccurs="unbounded">
                   <annotation>
                       <appinfo>
<!-- line 211 >> --> <jaxb:property name="columnRefs"/>
                       </appinfo>
                   </annotation>
               </element>
           </sequence>
           <attribute name="name" type="token"/>
       </complexType>
   </element>

So basically, I have a <columnRef> element that is defined a priori, I'm
defining a list (possibly numerous columnRefs), and I want jaxb to create a
java method with the following signature:

List getColumnRefs();

The xjc error from the ant build is the following:
[xjc] Compiling file:/really_long_path/database.xsd
[xjc] [ERROR] Specified property customization is not used.
[xjc] line 211 of database.xsd


I don't understand why this doesn't work, when it worked fine in the beta.
Can someone explain to me what is wrong and what the above error means?

Thanks VERY much in advance,

Les Hazlewood