Results 1 to 2 of 2

Thread: pollable ws:outbound-gateway

  1. #1
    Join Date
    Nov 2009
    Location
    Montreal, Quebec
    Posts
    398

    Question pollable ws:outbound-gateway

    In my application, I have an ws:outbound-gateway that I can send messages to invoke the web service and receive a response. This is however a user invoked process. I'd like to setup the ws:outbound-gateway to be pollable on a cron trigger. I know that I can put a poller element within the ws:outbound-gateway, but I'm a little confused on how to get it working. I need to send an initial XML payload to the web service in order to receive a response back.

    Here's what I've tried so far. I figured I needed to setup a message-factory that produces a request message with the payload I need in order to invoke the web service. However the application won't start because an exception is thrown saying I need a request-channel on my ws:outbound-gateway. For the sake of this example, I'm using a fixed-rate poller instead of a cron based one.

    Code:
    <ws:outbound-gateway message-factory="outOfServiceRequestFactory"
                             uri="http://webservices.carrier411.com/wsGetAllOOS.cfc?wsdl"
                             reply-channel="outOfServicesCarriersChannel">
            <poller max-messages-per-poll="1" fixed-rate="5000"/>
    </ws:outbound-gateway>
    <service-activator input-channel="outOfServiceCarriersChannel" ref="stringResponseServiceActivator"/>
    Thanks in advance for your help.

  2. #2
    Join Date
    Nov 2009
    Location
    Montreal, Quebec
    Posts
    398

    Default

    Maybe I've misunderstood the polling functionality of a ws:outbound-gateway. After doing a bit of reading, is it the request channel that gets polled and not the actual web service?

Posting Permissions

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