You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by gilboy <jo...@gmail.com> on 2013/01/14 12:24:26 UTC

ProducerTemplate Query

Hi

Assume I use the producerTemplate to send an exchange to an endpoint(seda).
Sending messages to this endpoint triggers a camel route which sends a
message to a web service, e.g. 

Client code:
Exchange response = producerTemplate.send("seda:testSeda"
              ExchangePattern.InOut,
              MyProcessor())

Route:
from("seda:testSeda").to("cxf:serviceDetails");

Now the producer is sending an exchange with a MEP of InOut. However, when
the route gets fired the SEDA consumer creates an Exchange with a MEP of
InOnly. 

Hence, it is unclear to me as to whether the result from the call to the Web
service will get returned to the client. From the diagram on this page I am
thinking the response from the web service will not get returned: 
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
<http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html>   

Thanks





--
View this message in context: http://camel.465427.n5.nabble.com/ProducerTemplate-Query-tp5725534.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ProducerTemplate Query

Posted by Christian Müller <ch...@gmail.com>.
Can you try:
Exchange response = producerTemplate.request("seda:testSeda", MyProcessor())

Best,
Christian

On Mon, Jan 14, 2013 at 12:24 PM, gilboy <jo...@gmail.com> wrote:

> Hi
>
> Assume I use the producerTemplate to send an exchange to an endpoint(seda).
> Sending messages to this endpoint triggers a camel route which sends a
> message to a web service, e.g.
>
> Client code:
> Exchange response = producerTemplate.send("seda:testSeda"
>               ExchangePattern.InOut,
>               MyProcessor())
>
> Route:
> from("seda:testSeda").to("cxf:serviceDetails");
>
> Now the producer is sending an exchange with a MEP of InOut. However, when
> the route gets fired the SEDA consumer creates an Exchange with a MEP of
> InOnly.
>
> Hence, it is unclear to me as to whether the result from the call to the
> Web
> service will get returned to the client. From the diagram on this page I am
> thinking the response from the web service will not get returned:
> http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html
> <http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html>
>
> Thanks
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/ProducerTemplate-Query-tp5725534.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--