Reputation: 712
The problem is simple but the implementation seems elusive. I want to send only once a few setup POSTs to a REST server and then begin polling every 5 seconds with GETs right afterward the POSTs was successful. What would the implementation for this look like in Camel Spring XML using the Camel CXFRS component? I don't want to write new code or a camel endpoint and would like to do this with the existing camel tools.
Upvotes: 0
Views: 71
Reputation: 1838
You could try something like below. For details on camel components refer to Apache camel documentation
<camelContext xmlns="http://camel.apache.org/schema/spring"
<route id="abc" shutdownRoute="Default" streamCache="true">
<from uri="timer://foo?fixedRate=true&period=100000" />
<setHeader headerName="CamelHttpMethod">
<constant>POST</constant>
</setHeader>
--setheader for Content-Type
<recipientList>
<simple>https4://post url</simple>
</recipientList>
<log message="After Transmission " loggingLevel="DEBUG"
logName="com.domain" />
<recipientList>
<simple>https4://get url</simple>
</recipientList>
--unmarshall
</route>
</camelContext>
Upvotes: 1