Hi Elias

So it is this one

> public List<BaseballCard> getAll()

which does not work...

Given BaseballCard's representation is 'resolved' through the adapter, the
reason the above does not work is that
JAXBElementProvider can not figure out what the collection element name
should be.
Either introduce a simple BaseballCardCollection bean or try experimenting
with a collectionWrapperMap property :
http://cxf.apache.org/docs/jax-rs.html#JAX-RS-Handlingexplicitcollections

hope it helps, Sergey





On Wed, Jul 21, 2010 at 7:57 PM, ermedeiros <[email protected]> wrote:

>
> Hi Sergey,
>
> the workaround does not work for me: If I try to add @XmlJavaTypeAdapter as
> a method annotation I get the same Exception (IllegalAnnotationExceptions)
> and if I try to add @XmlJavaTypeAdapter in the implementation class I get a
> ".No message body writer found" message.
>
> In addition, I only have problems with Collection or List parameters/return
> type. For example, a method like:
>
> @GET
> public BaseballCard getBaseballCard();
>
> works fine, but a method like:
>
> @GET
>  public List<BaseballCard> getAll()
>
> throws the famous IllegalAnnotationExceptions.
>
> Thanks,
> Elias
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/JAX-RS-service-w-interface-result-type-XmlJavaTypeAdapter-tp564352p1750090.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Reply via email to