Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 370831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:03:22+00:00 2026-05-12T14:03:22+00:00

I’d like to configure a process that looks something like: Method Call -> Dynamic

  • 0

I’d like to configure a process that looks something like:

Method Call -> Dynamic Proxy Gateway -> Channel -> Service Activator -> Method Call
             ^---------- Transformer <- Channel <-             [return value]

Effectively, I’d like to somehow access the hidden channel Spring Integration creates and transform the return message payload into a different message type.

A simple solution may at first appear to be configuring a default-reply-channel on the gateway, the issue is that I’m sharing the channel between bundles using OSGi. The Service Activator is provided by Bundle “B”, and offers a shared channel for incoming requests (it acts as a data provider service). Bundle “A” requires some data, so it requests it, but needs the result in an alternate format. Note that if Bundle “B” were to be able to use the default-reply-channel specified by Bundle “A” then Bundle “A” must share it. That’s all fair and well, but then I have a circular dependency in OSGi, and nothing would start.

It seems like another solution here would be to define an output-channel on the Service Activator, but this suffers from a slightly different problem. Assuming I share the output-channel from Bundle “B” I’ve mitigated the circular dependency issue, but now anytime someone requests something from Bundle “A” the reply goes to everyone attached to the output channel — this, too, is undesirable.

[Edit: What I mean here is that if “B” shares both an input and an output channel for its service activator then anyone bound to “B”‘s output channel will receive the result of anyone’s request to “B”‘s input channel — and the desired behavior is that the replies are directed at the requestors.

I should note that the transformer here makes sense only in the context of Bundle A. Bundle B provides a service (for all intents and purposes one that I have no control over). The transformation, specific to the needs of Bundle A should reside in Bundle A.]

So, what I think I really need is to be able to configure a transformer on replies to a dynamic proxy gateway, but try as I might I can’t find such a device in the Spring Integration manual. As always, help would be greatly appreciated.

—

Edit 2: I attempted two other tactics here:

  1. Use a service-activator that refers to the OSGi shared channel from Bundle B

    The result was that the returned element was a GenericMessageType — which it could be possible to transform. The GenericMessageType is really the boolean result of the “send” method which the service-activator must point to, not the reply message. So this method does not work.

  2. Use a header-enricher to set REPLY_CHANNEL and pass the reply channel as a reference rather than a value.

    This technique did not work, the REPLY_CHANNEL header element appears to be ignored when the default-reply-channel of the gateway is set (and the default-reply-channel must be set).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:03:22+00:00Added an answer on May 12, 2026 at 2:03 pm

    In theory the real answer here is to use a chain.

    The configuration for Bundle A will look something like

    <si:gateway id="gw" default-request-channel="xyz" />
    <si:channel id="xyz" />
    <si:chain input-channel="xyz" />
        <si:service-activator />
        <si:transformer />
    </si:chain>
    

    Note for Bundle B the configuration is unchanged and only a single channel is shared through OSGi for access by Bundle A or any tertiary bundles.

    Two options for the service-activator are available:

    1. Shared service through OSGi
    2. Custom service that simply invokes a proxy-gateway for the pre-transformation returned data type.

    The proxy-gateway in Bundle A will inject into some input-channel “xyz” and ultimately the implied return channel will contained the transformed content as desired.

    This solution is nearly the same as the one proposed by SingleShot, however here we prevent the sharing of a real service through OSGi, maintaining bundle boundaries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 186k
  • Answers 186k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Trying using the PreviewMouseLeftButtonDown event rather than MouseLeftButtonDown. Accoding to… May 12, 2026 at 5:09 pm
  • Editorial Team
    Editorial Team added an answer So the post is going to your Account controller, LogOn… May 12, 2026 at 5:09 pm
  • Editorial Team
    Editorial Team added an answer Yeah you should be able to do it by using… May 12, 2026 at 5:09 pm

Related Questions

I have a French site that I want to parse, but am running into
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have text I am displaying in SIlverlight that is coming from a CMS
I am currently running into a problem where an element is coming back from

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.