You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2009/12/18 09:55:18 UTC

ProducerTemplate - requestBody / sendBody ..

Hi,

The ProducerTemplate allows to send a body object to the exchange without
defining the endpoint because we have define it through

    @EndpointInject(uri = "queuingservice:queue:inout")
    ProducerTemplate producer;

  void sendBody(Object body);
  void sendBodyAndHeader(Object body, String header, Object headerValue);

but this is not the case for request

Object requestBodyAndHeader(Endpoint endpoint, Object body, String header,
Object headerValue);

Is there any reason ? Could we have the following method ?

Object requestBodyAndHeader(Object body, String header, Object headerValue);

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm

Re: ProducerTemplate - requestBody / sendBody ..

Posted by Charles Moulliard <cm...@gmail.com>.
Done --> https://issues.apache.org/activemq/browse/CAMEL-2302

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard

Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm


On Fri, Dec 18, 2009 at 11:26 AM, Claus Ibsen <cl...@gmail.com> wrote:

> On Fri, Dec 18, 2009 at 9:55 AM, Charles Moulliard <cm...@gmail.com>
> wrote:
> > Hi,
> >
> > The ProducerTemplate allows to send a body object to the exchange without
> > defining the endpoint because we have define it through
> >
> >    @EndpointInject(uri = "queuingservice:queue:inout")
> >    ProducerTemplate producer;
> >
> >  void sendBody(Object body);
> >  void sendBodyAndHeader(Object body, String header, Object headerValue);
> >
> > but this is not the case for request
> >
> > Object requestBodyAndHeader(Endpoint endpoint, Object body, String
> header,
> > Object headerValue);
> >
> > Is there any reason ? Could we have the following method ?
> >
> > Object requestBodyAndHeader(Object body, String header, Object
> headerValue);
> >
>
> Yeah its probably missing. However ProducerTemplate has a zillion
> methods already so we are not happy just adding many new methods.
> But that one comes handy, so create a JIRA ticket for it.
>
> > Regards,
> >
> > Charles Moulliard
> > Senior Enterprise Architect
> > Apache Camel Committer
> >
> > *****************************
> > blog : http://cmoulliard.blogspot.com
> > twitter : http://twitter.com/cmoulliard
> > Linkedlin : http://www.linkedin.com/in/charlesmoulliard
> >
> > Apache Camel Group :
> > http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>

Re: ProducerTemplate - requestBody / sendBody ..

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Dec 18, 2009 at 9:55 AM, Charles Moulliard <cm...@gmail.com> wrote:
> Hi,
>
> The ProducerTemplate allows to send a body object to the exchange without
> defining the endpoint because we have define it through
>
>    @EndpointInject(uri = "queuingservice:queue:inout")
>    ProducerTemplate producer;
>
>  void sendBody(Object body);
>  void sendBodyAndHeader(Object body, String header, Object headerValue);
>
> but this is not the case for request
>
> Object requestBodyAndHeader(Endpoint endpoint, Object body, String header,
> Object headerValue);
>
> Is there any reason ? Could we have the following method ?
>
> Object requestBodyAndHeader(Object body, String header, Object headerValue);
>

Yeah its probably missing. However ProducerTemplate has a zillion
methods already so we are not happy just adding many new methods.
But that one comes handy, so create a JIRA ticket for it.

> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus