This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

cxf interceptor question  RSS feed

 
Praful Thakare
Ranch Hand
Posts: 643
  • 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: 643
  • 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 ...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!