Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-3167

Provide access to incoming message when processing an outgoing message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3
    • 2.3.1
    • Core
    • None

    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)

      { 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

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            owulff Oliver Wulff
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: