Announcement Announcement Module
No announcement yet.
ws - poller Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ws - poller

    Is there any way to poll a web service (WS).

    There is a WS that i need to poll it would send me back information about the last changes in the information. is there any way to do an inbound-channel-adapter using the ws namespace, or just add a poller to the ws.

    I'm using integration 1.0 but can migrate to 2.0 with no major isssues.

  • #2
    Ok, that is the only solution that works, well at least the only one that I can think about. I adapt the WS sample to a poller.

    Any suggestion or comments will be welcome.

    	<inbound-channel-adapter  ref="outputMessage"  method="messageBuilder"  channel="messageRequestBuilderChannel" >
        	<poller max-messages-per-poll="1" >
             	<interval-trigger interval="10000"  />
        <channel id="messageRequestBuilderChannel"/>
    	<bridge input-channel="messageRequestBuilderChannel" output-channel="webServiceInvokerChannel"/>
    	<chain id="chainb" input-channel="webServiceInvokerChannel" output-channel="celsiusChannel" auto-startup="true">
    			<header name="springintegration_ws_soapAction" value=""/>
    		<int-ws:outbound-gateway uri="" ignore-empty-responses="false" />


    • #3
      That's about right, you'll have to send a message to a ws in order to get a response.

      We could of course allow a short hand for this in the namespace, for example if you have a fixed message you would send every time:

      <ws:outbound-gateway: .... input-file="fixed-request.xml" >
      If you like that idea, you should create an issue for it.

      Other than that you could simplify your configuration a bit (I don't think you need the header enricher, chain and bridge) but it will amount to the same fundamental strategy.