users@jersey.java.net

Re: [Jersey] Re: Returning response in JSON format in case of Exceptions

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 10 May 2010 16:59:37 +0200

On May 10, 2010, at 4:52 PM, j2eeuser32 wrote:

>
> Thanks for the quick reply.
>
> I wrote the clients in Java (the ones I posted here) to test my
> service, but
> the actual client utilizing the service would be non-java.
>

OK.


> I like your idea of using ClientResponse always, but it only works
> in case
> of Java clients.
>

Other APIs written in Java or other languages will have their own way
of processing responses. The important thing to note is the server is
not bound to a specific client API.

The Jersey client API throws UniformInterfaceException because that is
how it is specified to react to certain response status codes. It is
not specified by the server.

Paul.