Hi, 
I need to send request to a dynamically constructed URL list which provides
RESTful web services. So my simplest need is to send POST requests with
fixed JSON body, later I may need to construct different JSON body for each
URL in the list as well, and since it's RESTful service, DELETE/PUT are also
possible. how should I do it?

This is standard recipientList pattern from document:
<route>
  <from uri="direct:a" />
  <recipientList delimiter=",">
    <header>myHeader</header>
  </recipientList>
</route>

Should I do:
<route>
  <from uri="servlet:///sendToRecipients" />
  <setHeader headerName="WEB_SERVICE_URLS">
        <constant>construct my urls here</constant>
  </setHeader>
  <setHeader headerName="CamelHttpMethod">
        <constant>POST</constant>
  </setHeader>
  <setHeader headerName="Content-Type">
    <constant>application/json</constant>
  </setHeader>
  <setBody>
    <constant>{"name":"fixed text"}</constant>
  </setBody>
  <recipientList delimiter=",">
    <header>WEB_SERVICE_URLS</header>
  </recipientList>
</route>

Thanks for advice.



--
View this message in context: 
http://camel.465427.n5.nabble.com/recipientList-with-POST-and-request-body-tp5725142.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to