[
https://issues.apache.org/jira/browse/CXF-3167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXF-3167.
------------------------------
Resolution: Fixed
Fix Version/s: 2.3.1
Assignee: Daniel Kulp
This was added for 2.3.1.
> Provide access to incoming message when processing an outgoing message
> ----------------------------------------------------------------------
>
> Key: CXF-3167
> URL: https://issues.apache.org/jira/browse/CXF-3167
> Project: CXF
> Issue Type: Improvement
> Components: Core
> Affects Versions: 2.3.0
> Reporter: Oliver Wulff
> Assignee: Daniel Kulp
> Fix For: 2.3.1
>
>
> 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) {
> LOG.fine("Previous message available");
> } 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.put("PREVIOUS_MESSAGE", previousMessage);
> }
>
> Message oldMessage = CURRENT_MESSAGE.get();
> ...
> have to do some testing on this
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.