Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cxf interceptor question

 
Praful Thakare
Ranch Hand
Posts: 642
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there a way to tell cxf to stop only user defined interceptors when is invoked?
I am in situation where it kills even the default interceptors like JAXRSOutInterceptor.

to give some background, I have to kill interceptors if one of the interceptor throws fault but still write something to response.
currently I am writing using ServletOutputStream taking from

but its not a good way as I cannot handle the ouput type (either xml or json).

Any Pointers?
-P
 
Praful Thakare
Ranch Hand
Posts: 642
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finally with lot of debugging thru cxf code , found following way to do this....


This works only if you invoke the method programatically from Interceptor that will execute this code, do NOT throw fault from interceptor as it will always respond back with 500 error message.

hope it helps someone ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic