Description
CXF can act as an intermediary where it is on the one hand a service provider and on the other hand the service implementation consumes other services.
Within the outgoing interceptor chain (service consumer) it must get access to the incoming message.
An interceptor can access the incoming message with the following API:
message.get("PREVIOUS_MESSAGE");
Implementation proposal:
...
private Message previousMessage;
...
private PhaseInterceptorChain(PhaseInterceptorChain src) {
...
//
previousMessage = PhaseInterceptorChain.getCurrentMessage();
if (previousMessage != null)
else
{ LOG.finest("No previous message available"); }...
@SuppressWarnings("unchecked")
public synchronized boolean doIntercept(Message message) {
updateIterator();
pausedMessage = message;
// add the incoming message to the current message
if (previousMessage != null)
Message oldMessage = CURRENT_MESSAGE.get();
...
have to do some testing on this