views:

322

answers:

1

I freaking loosing my mind on this:

I have this code:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ANetApiResponseType", propOrder = {
    "resultCode",
    "messages"})

and I get this error:

Type mismatch: cannot convert from XmlAccessType to AccessType

I've googled , but all these problems usually occur because someone uses "AccessType" , but I already use the XmlAccessor/Access type !

Any ideas?

+1  A: 

By setting @XmlAccessorType, the bean can choose to only allow annotated fields to be serialized.

Have a link for your reference - http://www.caucho.com/resin/doc/jaxb-annotations.xtp#@XmlAccessorType

adatapost