Apache CXF - return value without service method invocation
posted 4 years ago
I'm trying to use EHCache with Apache-CXF WebServices. I have written custom Apache-CXF interceptor which has possibility to ask EHCache Cache Manager about data stored in it. Keys are evaluated using parameters passed to SOAPMessage object. But I don't know how to stop interceptor chain if object is in cache (because this request is not necessary) and return value to client.
My interceptor is on client side as a outbound interceptor. If interceptor found object in cache then Apache-CXF should not produce request to server and just return value to client. Anyone has idea how to do it?
I dont know whether this is in CXF or not (Not saying that its not there in CXF). But if you are using Spring Framework in your project, you can have a Method Interceptor there & you can decide not to proceed with invocation of actual method.