I had this error this morning and although googling did help me understand the cause, it didn't help me figure out the solution.
I have finally resolved it and figured I would share it for future reference.
This is an error due to JAXB. More specifically, this is due to the fact that 2 versions of JAXB are being used. In my case I took a WSDL and generated a client stub using Metro 2.0.1. It so happens that Metro 2.0.1 includes JAXB 2.2.1. My client was therefore generated using JAXB 2.2.1.
That said, the JDK 1.6 now comes with JAXB too, but a slightly older version (2.1.1 I believe) which leads to the following error message in your favorite IDE:
The attribute required is undefined for the annotation type XmlElementRef
The only way to solve it was to change the order of my build class path in Eclipse and to put the Metro libs before the JDK libs.
Did anyone find any other way?
No matter what they say in Ohio, we're still first in flight!