Q:

How to use jaxb customization to change variable class

I try this:
<jxb:bindings node="xsd:element[@name='CustomList']">
    <jxb:class name="java.util.List" />
</jxb:bindings>

but generated class look like:
    @XmlElementRef(name = "CustomList", namespace = "urn:org:MyXsd:v1", type = JavaUtilList.class)
    protected JAXBElement<?> customList;

A:

This configuration needed for change class name of your "CustomList".
If you want change type you should use an XMLAdapter
<jxb:javaType name="java.util.Date" printMethod="com.xsd.DateTimeAdapter.printDateTime" parseMethod="com.xsd.DateTimeAdapter.parseDateTime" />

this is an example for DateTime...
public class DateTimeAdapter {
    public static Date parseDateTime(String s) {
        return DatatypeConverter.parseDateTime(s).getTime();
    }
    public static String printDateTime(Date dt) {
        Calendar cal = new GregorianCalendar();
        cal.setTime(dt);
        return DatatypeConverter.printDateTime(cal);
    }
}

