users@jaxb.java.net

_at_XmlAccessorType(AccessType.FIELD) type mismatch

From: bubada <dbuibach_at_vub.ac.be>
Date: Mon, 28 May 2007 02:36:29 -0700 (PDT)

Here is a generated java class from JAXB:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB)
Reference Implementation, v2.0-b26-ea3
// See http://java.sun.com/xml/jaxb http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the
source schema.
// Generated on: 2006.09.26 at 11:46:45 AM CEST
//


package generated;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.AccessType;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for applicationAssociationsType complex type. <p>The
following schema fragment specifies the expected content contained within
this class. <pre> &lt;complexType name="applicationAssociationsType">
&lt;complexContent> &lt;restriction
base="{http://www.w3.org/2001/XMLSchema}anyType"> &lt;sequence> &lt;element
name="association" type="{}associationType" maxOccurs="unbounded"/>
&lt;/sequence> &lt;/restriction> &lt;/complexContent> &lt;/complexType>
</pre>
 */
@XmlAccessorType(AccessType.FIELD)
@XmlType(name = "applicationAssociationsType", propOrder = {
    "association"
})
public class ApplicationAssociationsType {

    protected List<AssociationType> association;

    /**
         * Gets the value of the association property. <p> This accessor method
returns a reference to the live list, not a snapshot. Therefore any
modification you make to the returned list will be present inside the JAXB
object. This is why there is not a <CODE>set</CODE> method for the
association property. <p> For example, to add a new item, do as follows:
<pre> getAssociation().add(newItem); </pre> <p> Objects of the following
type(s) are allowed in the list {_at_link AssociationType }
         * @uml.property name="association"
         */
    public List<AssociationType> getAssociation() {
        if (association == null) {
            association = new ArrayList<AssociationType>();
        }
        return this.association;
    }

}
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Eclipse reports the following error:
"Type mismatch: cannot convert from AccessType to XmlAccessType" and
suggests no solutions.

This error occurs in every Java class that is generated from my XML schema.

Thank you very much for any help.


-- 
View this message in context: http://www.nabble.com/%40XmlAccessorType%28AccessType.FIELD%29-type-mismatch-tf3826988.html#a10833477
Sent from the java.net - jaxb users mailing list archive at Nabble.com.