I am a camel newbie trying to use mina tcp to talk to a legacy system and get
response back. Since the host:port for the legacy system to talk varies with
each exchange,  I am using a beanRef with mina url and appropriate codec. I
can see that the response is properly decoded and written to
protocoldecoderoutput by my response decoder. But, my exchange out message
is still the tcp url returned by the beanRef. I am sure, I am missing
something missing to actually see the decoded response in my exchange. I
have been struggling with it for more than a week and any suggestions would
be greatly appreciated. My route is something like this

from(direct:someEndpoint).marshal().string("UTF-8").beanRef("MinaUrlFinder",
"route").
                .process(new Processor() {
                public void process(Exchange exchange) {
                    Message out = exchange.getOut();
                    System.out.println("Response " +
out.getBody(String.class));
            }
        });

What I see as output here is the Mina URL returned by the beanRef. What I
really want to see is the actual response coming from the external server
over tcp.

My beanRef route method is like this:

    @RecipientList
    public String route(@Body Document body, Exchange exchange) throws
Exception {

        String mina_uri = getMinaUriForServiceId(serviceId);
        if (mina_uri.isEmpty()) {
            throw new Exception(); 
        }
        return mina_uri;
    }
-- 
View this message in context: 
http://www.nabble.com/camel-mina-using-beanRef-tp25234264p25234264.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to