users@jersey.java.net

[Jersey] Re: How to get entites (of various type) from ClientResponse

From: crc32a <carlos.garza_at_rackspace.com>
Date: Wed, 28 Mar 2012 17:54:56 -0700 (PDT)

Pavel some of us are not in control of the rest api we are consuming(We can't
create objectClass specific resources). We are forced to consume a URL that
can return multiple types of objects. For example if you tried a GET
/some/user operation we could expect a User.class to be returned but if the
operation fails we could get an Error.class object that describes the error
that occured. How would we multiplex the differen't types of objects comming
back fro the service? I don't know what you mean by return a wrapper class.
If you mean by write code on the rest server I can't do that I'm only
writing the client that will consume the rest service.



--
View this message in context: http://jersey.576304.n2.nabble.com/How-to-get-entites-of-various-type-from-ClientResponse-tp6183824p7415979.html
Sent from the Jersey mailing list archive at Nabble.com.