You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Nicola Buso <nb...@ebi.ac.uk> on 2018/12/13 12:09:52 UTC

TransformInInterceptor and CacheControlClientRequestFilter don't work well together

Hi,

I'm using cxf to create a REST client and I'm using:
TransformInInterceptor
CacheControlClientRequestFilter

the in the request processing chain.
The problem is if the cache filter fill the request with entities from
the cache the transform filter will end up with a NullPointerException
because the InputStream is null.

I see TransformInInterceptor has a check that can be done against a
context property but I don't know how to make this property available
in the message context.
Is there a way to understand the Cache filter filled the response with
an entity and set a property that make the TransformInInterceptor
skipping the processing?

In any case I see potential for some code changes because properties
added by the cache filter:
CacheControlClientRequestFilter.CACHED_ENTITY_PROPERTY

are not visible outside the package.



Nicola


-- 
Nicola Buso
Software Engineer - Web Production Team

European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory

Wellcome Trust Genome Campus
Hinxton
Cambridge CB10 1SD
United Kingdom

URL: http://www.ebi.ac.uk