1
votes

I want to schedule (with date time) a Webservice call using Spring integration. I am planning to use the below configuration to invoke the REST Webservice. I am new to Webservice and SI. Could any of you help me to come up with a scheduler to do the same?

<int-http:outbound-gateway request-channel="sampleRequestChannel"
    reply-channel="sampleReplyChannel"
    url="http://<server details>"
    http-method="POST" expected-response-type="java.lang.String" />
1
Does you program do more that this? If no, why not using the system scheduler? Otherwise you can either get in Quartz scheduler and trigger a run through a MessageGateway or use Spring Batch if you want to extend this further.daniel.eichten
Thanks for your reply..I need to schedule this WS call based on the date and time provided by the user which they will be modifying frequently. :( I will be getting those date time details from database based on user input.kattoor

1 Answers

1
votes

To read the data from DB there is JDBC adapters. One of them is:

<int-jdbc:inbound-channel-adapter>
    <int:poller/>
</int-jdbc:inbound-channel-adapter>

with which you can poll some table in DB periodically for the fresh value of date and time and send it as a payload to the Spring Integration flow.

Another is <int-jdbc:outbound-gateway> which is based on the upstream flow and can be triggered by user event.