Results 1 to 3 of 3

Thread: ws - poller

  1. #1

    Default 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. #2

    Default

    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.


    Code:
    	<inbound-channel-adapter  ref="outputMessage"  method="messageBuilder"  channel="messageRequestBuilderChannel" >
        	<poller max-messages-per-poll="1" >
             	<interval-trigger interval="10000"  />
         	</poller>
      	</inbound-channel-adapter>
    	
    	
    	
        <channel id="messageRequestBuilderChannel"/>
    	
    	
    	<bridge input-channel="messageRequestBuilderChannel" output-channel="webServiceInvokerChannel"/>
    
    
    	<chain id="chainb" input-channel="webServiceInvokerChannel" output-channel="celsiusChannel" auto-startup="true">
    		<header-enricher>
    			<header name="springintegration_ws_soapAction" value="http://tempuri.org/FahrenheitToCelsius"/>
    		</header-enricher>
    		<int-ws:outbound-gateway uri="http://www.w3schools.com/webservices/tempconvert.asmx" ignore-empty-responses="false" />
    	</chain>

  3. #3
    Join Date
    May 2007
    Location
    Netherlands
    Posts
    614

    Default

    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:

    Code:
    <ws:outbound-gateway: .... input-file="fixed-request.xml" >
       <poller>
    ....
    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •