Yes, option a) is the simplest - c) is always available if you'd like to
start customizing the WAE mapping using a standard JAX-RS mechanism.
On 22/09/16 13:31, Francesco Chicchiriccò wrote:
On 22/09/2016 13:31, Sergey Beryozkin wrote:
Happy to be the good one :-)
Of course you are ;-)
Please see comments inline
Same for me.
On 22/09/16 12:07, Francesco Chicchiriccò wrote:
during a recent chat I had with the good Sergey (on another topic), I
have found that the JAX-RS's standard WebApplicationException (and child
exceptions) are handled by CXF, according to the specs, via
Syncope's RestServiceExceptionMapper, however, contains some code  to
manage such exceptions, which is never going to be triggered, at this
Please consider that this affects both 1.2 and 2.0.
IMO, we should either:
(a) remove  and let CXF do its work according to the specs
(b) set the 'default.wae.mapper.least.specific' (which is false by
default) to delegate WebApplicationException to 
I've checked the spec archives - indeed Marek was saying that WAE,
being a special type of exception, should not be given to the mappers
which are typed to handle WAE subclasses (in that case it was a
CXF needs to have a WAE mapper to meet various JAX-RS exception
The question is if WAE customization is needed. If no - let CXF do it.
If yes, how a user can customize WAE processing if what CXF provides
OOB does not suit.
(b) would be one option - it is less JAX-RS and more CXF centric
solution - I added that flag because at some point CXF were always
giving the preference to the user-provided providers - so custom
RuntimeException or Exception mappers were able to catch WAE at some
point of time - but later on, after some TCK JIRA issues I ended up
making the code more spec aligned - this caused some side-effects so I
added the flag to keep the user code which depended on the original
selection of the mappers operating.
Yes another option is introduced a mapper specifically typed to handle
WAE - so you'd have an Exception mapper to handle all but WAE
exceptions and a dedicated mapper to handle WAE only - example - it
may extend a CXF mapper and customize few things or do a WAE mapping
Ok, that would be option (c) then.
Considering what you say above I would rather go with (a) or (c) - as
(b) appears a bit too "custom".
Talend Community Coders