@John: GenericEntity is not abstract ;)
Personally I use the public constructor to avoid to need to extend it in
several places and ensure the dyncamic type is the one I expect whatever
impl I use but it needs a Type implementation matching a generic type:
Off the top of my head, something like:
@Path("apath")
@GET
@Produces(MediaType.APPLICATION_JSON)
public List getWorkshops() {...return a list...}
...client side WebTarget...
List workshops =
webTarget.request(MediaType.APPLICATION_JSON).get().readEntity(new
GenericType() {});
Andy.
Esvuse but for instantiation the operator is new () not {}
Il 02/ago/2016 02:11, "John D. Ament-2 [via TomEE & OpenEJB]" <
ml-node+s979440n4679567...@n4.nabble.com> ha scritto:
> GenericEntity is an abstract class. You're instantiating an anonymous
> instance of it.
>
> On Mon, Aug 1, 2016 at
GenericEntity is an abstract class. You're instantiating an anonymous
instance of it.
On Mon, Aug 1, 2016 at 8:06 PM mauro2java2011
wrote:
> I try to understand how return a collection of object as response with rest
>
>
>
>
> import javax.ws.rs.core.GenericEntity;
>
I try to understand how return a collection of object as response with rest
import javax.ws.rs.core.GenericEntity;
//...
@GET
public Response workshops() {
List workshops = ...//a list of entities
GenericEntity> l
ist = new