I\'m building web service using JAX-WS. I have a strange problem that the annotation @XmlElement(required=true)
for @WebParam
works in some @
If you are having the following error message: "The annotation @XmlElement is disallowed for this location", chances are you're using the wrong import statement.
Change it to:
import javax.xml.bind.annotation.XmlElement;
As Eclipse suggests another package as the first option, it's a very common mistake.