title: Spring integration gateway "Dispatcher has no subscribers"
body: <p>I am getting an exception <code>Dispatcher has no subscribers</code> on the <code>outboundChannel</code> and can't figure out why. I am sure its something simple, I have stripped back my code to a very simple sample below:</p>
  
  <p>My context is:</p>
  
  <pre><code>&lt;bean id="requestService"
      class="com.sandpit.RequestService" /&gt;
  
  &lt;integration:channel id="inboundChannel" /&gt;
  
  &lt;integration:service-activator id="service"
      input-channel="inboundChannel"
      output-channel="outboundChannel"
      ref="requestService"
      method="handleRequest" /&gt;
  
  &lt;integration:channel id="outboundChannel" /&gt;
  
  &lt;integration:gateway id="gateway"
      service-interface="com.sandpit.Gateway"
      default-request-channel="inboundChannel"
      default-reply-channel="outboundChannel" /&gt;
  
  &lt;bean class="com.sandpit.GatewayTester"&gt;
      &lt;property name="gateway"
          ref="gateway" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>My Java code is:</p>
  
  <pre><code>public interface Gateway {
  
      String receive();
      void send(String message);
  }
  
  public class RequestService {
  
      public String handleRequest(String request) {
  
          return "Request received: " + request;
      }
  }
  
  public class GatewayTester implements ApplicationListener&lt;ContextRefreshedEvent&gt; {
  
      private Gateway gateway;
  
      public void setGateway(Gateway gateway) {
  
          this.gateway = gateway;
      }
  
      @Override
      public void onApplicationEvent(ContextRefreshedEvent event) {
  
          gateway.send("Hello world!");
          System.out.println("FROM SERVICE: " + gateway.receive());
      }
  }
  </code></pre>
  
  <p>Note: A breakpoint does tell me that the <code>RequestService</code> is actually handling the request.</p>