I need to use an interface as a parameter and as a return type in a JAX-WS web method. When starting my server I receive an IllegalAnnotationsException
, which tells me that JAXB cannot handle interfaces.
I tried to annotate my class, method result and method parameters with @XmlRootElement
and @XmlElement(type = ...)
respectively, but this does not work.
How can I use an interface as an parameter and as a result type in a JAX-WS web method?