Re: [Resteasy-users] ClientErrorInterceptor and JAX-RS 2.0 clients

2014-07-01 Thread Peter Wright
Hi Bill,

I did, yes - this is the code:

https://github.com/petergeneric/stdlib/blob/e09fc586edbee4d7ff3b5040742726e4bb9a595c/guice/restclient/src/main/java/com/peterphi/std/guice/restclient/resteasy/impl/ResteasyClientErrorInterceptor.java

On 6/30/2014 5:17 PM, Bill Burke wrote:
What did you do in your clienterrorinterceptor? Convert it to an exception?


On 6/30/2014 12:48 PM, Peter Wright wrote:
 Hi,

 I’ve been using the (now deprecated) proxy client since resteasy 2. I’m
 using 3.0.7.Final and am wanting to use WebTarget to build the dynamic
 proxy using ResteasyClient.target(url).proxy(interface).

 I use a server-side ExceptionMapper that produces a structured
 representation of the exception which is then used by the client to
 produce more descriptive client-side errors about what failed on the
 server, which server and why. I had been using ClientErrorInterceptor
 for this, but I see that the new dynamic proxy client no longer uses
 ClientErrorInterceptor… is there a way to do this in the new dynamic
 proxy client? I’ve tried using a ReaderInterceptor and DynamicFeature
 but it doesn’t seem to get called when (for example) a 404 error is
 returned.

 Any pointers would be much appreciated.

 --
 Peter


 --
 Open source business process management suite built on Java and Eclipse
 Turn processes into business applications with Bonita BPM Community Edition
 Quickly connect people, data, and systems into organized workflows
 Winner of BOSSIE, CODIE, OW2 and Gartner awards
 http://p.sf.net/sfu/Bonitasoft



 ___
 Resteasy-users mailing list
 Resteasy-users@...
 https://lists.sourceforge.net/lists/listinfo/resteasy-users


--  
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

  



--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] ClientErrorInterceptor and JAX-RS 2.0 clients

2014-07-01 Thread Peter Wright
Hi Bill,

Thanks, that did the trick

-- 
Peter Wright

On 1 July 2014 at 13:34:45, Bill Burke (bbu...@redhat.com) wrote:

If you write a ClientResponseFilter you can do the processing there.  
The only thing is is that your exceptions need to extend  
ResponseProcessingException or they will be wrapped in one.

On 7/1/2014 4:19 AM, Peter Wright wrote:
 Hi Bill,

 I did, yes - this is the code:

 https://github.com/petergeneric/stdlib/blob/e09fc586edbee4d7ff3b5040742726e4bb9a595c/guice/restclient/src/main/java/com/peterphi/std/guice/restclient/resteasy/impl/ResteasyClientErrorInterceptor.java

 On 6/30/2014 5:17 PM, Bill Burke wrote:
 What did you do in your clienterrorinterceptor? Convert it to an exception?


 On 6/30/2014 12:48 PM, Peter Wright wrote:
 Hi,

 I’ve been using the (now deprecated) proxy client since resteasy 2. I’m
 using 3.0.7.Final and am wanting to use WebTarget to build the dynamic
 proxy using ResteasyClient.target(url).proxy(interface).

 I use a server-side ExceptionMapper that produces a structured
 representation of the exception which is then used by the client to
 produce more descriptive client-side errors about what failed on the
 server, which server and why. I had been using ClientErrorInterceptor
 for this, but I see that the new dynamic proxy client no longer uses
 ClientErrorInterceptor… is there a way to do this in the new dynamic
 proxy client? I’ve tried using a ReaderInterceptor and DynamicFeature
 but it doesn’t seem to get called when (for example) a 404 error is
 returned.

 Any pointers would be much appreciated.

 --
 Peter


 --
 Open source business process management suite built on Java and Eclipse
 Turn processes into business applications with Bonita BPM Community Edition
 Quickly connect people, data, and systems into organized workflows
 Winner of BOSSIE, CODIE, OW2 and Gartner awards
 http://p.sf.net/sfu/Bonitasoft



 ___
 Resteasy-users mailing list
 Resteasy-users@...
 https://lists.sourceforge.net/lists/listinfo/resteasy-users


 --
 Bill Burke
 JBoss, a division of Red Hat
 http://bill.burkecentral.com





 --
 Open source business process management suite built on Java and Eclipse
 Turn processes into business applications with Bonita BPM Community Edition
 Quickly connect people, data, and systems into organized workflows
 Winner of BOSSIE, CODIE, OW2 and Gartner awards
 http://p.sf.net/sfu/Bonitasoft
 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/resteasy-users


--  
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users
--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


Re: [Resteasy-users] ClientErrorInterceptor and JAX-RS 2.0 clients

2014-06-30 Thread Bill Burke
What did you do in your clienterrorinterceptor?  Convert it to an exception?


On 6/30/2014 12:48 PM, Peter Wright wrote:
 Hi,

 I’ve been using the (now deprecated) proxy client since resteasy 2. I’m
 using 3.0.7.Final and am wanting to use WebTarget to build the dynamic
 proxy using ResteasyClient.target(url).proxy(interface).

 I use a server-side ExceptionMapper that produces a structured
 representation of the exception which is then used by the client to
 produce more descriptive client-side errors about what failed on the
 server, which server and why. I had been using ClientErrorInterceptor
 for this, but I see that the new dynamic proxy client no longer uses
 ClientErrorInterceptor… is there a way to do this in the new dynamic
 proxy client? I’ve tried using a ReaderInterceptor and DynamicFeature
 but it doesn’t seem to get called when (for example) a 404 error is
 returned.

 Any pointers would be much appreciated.

 --
 Peter


 --
 Open source business process management suite built on Java and Eclipse
 Turn processes into business applications with Bonita BPM Community Edition
 Quickly connect people, data, and systems into organized workflows
 Winner of BOSSIE, CODIE, OW2 and Gartner awards
 http://p.sf.net/sfu/Bonitasoft



 ___
 Resteasy-users mailing list
 Resteasy-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/resteasy-users


-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com

--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users


[Resteasy-users] ClientErrorInterceptor and JAX-RS 2.0 clients

2014-06-30 Thread Peter Wright
Hi,

I’ve been using the (now deprecated) proxy client since resteasy 2. I’m using 
3.0.7.Final and am wanting to use WebTarget to build the dynamic proxy using 
ResteasyClient.target(url).proxy(interface).

I use a server-side ExceptionMapper that produces a structured representation 
of the exception which is then used by the client to produce more descriptive 
client-side errors about what failed on the server, which server and why. I had 
been using ClientErrorInterceptor for this, but I see that the new dynamic 
proxy client no longer uses ClientErrorInterceptor… is there a way to do this 
in the new dynamic proxy client? I’ve tried using a ReaderInterceptor and 
DynamicFeature but it doesn’t seem to get called when (for example) a 404 error 
is returned. 

Any pointers would be much appreciated.

-- 
Peter--
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft___
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users