> But when something like Collection<T> or
> Map<K, V> is returned the problem gets harder and i have not solved it yet
> to support a general resolving mechanism for any type variable embedded
> within a parameterized type.
I think it's pretty much impossible to solve this correctly, due to erasure.
You could probably pick a MessageBodyWriter for the type declared on
the method (as opposed to the actual type returned), which would get
you closer, but that's probably an awkward solution that will then
byte even more people...
Martin