title: Misleading exception message in GatewayMethodInboundMessageMapper with un-annotated parameters
body: <p>The following code throws a <code>MessagingException</code> with message <code>At most one parameter (or expression via method-level @Payload) may be mapped to the payload or Message. Found more than one on method [public abstract java.lang.Integer org.example.PayloadAndGatewayHeader$ArithmeticGateway.add(int,int)]</code>.</p>
  
  <pre><code>@MessagingGateway
  interface ArithmeticGateway {
  
      @Gateway(requestChannel = "add.input", headers = @GatewayHeader(name = "operand", expression = "#args[1]"))
      Integer add(@Payload final int a, final int b);
  
  }
  </code></pre>
  
  <p>The desired functionality could be achieved with something like:</p>
  
  <pre><code>@MessagingGateway
  interface ArithmeticGateway {
  
      @Gateway(requestChannel = "add.input", headers = @GatewayHeader(name = "operand", expression = "#args[1]"))
      @Payload("#args[0]")
      Integer add(final int a, final int b);
  
  }
  </code></pre>
  
  <p>Should the first version also work? Nevertheless I believe the error message could be improved.</p>
  
  <p>A sample project can be found <a href="https://github.com/asigalas/spring-integration-tests" rel="nofollow noreferrer">here</a>. Please check org.example.PayloadAndGatewayHeader and org.example.PayloadAndGatewayHeaderTest.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The purpose of <code>@GatewayHeader</code> was to show why one may want to have additional parameters that will not be part of the payload but I am afraid it created confusion. Here is a more streamlined example:</p>
  
  <pre><code>@MessagingGateway
  interface ArithmeticGateway {
  
      @Gateway(requestChannel = "identity.input")
      Integer identity(@Payload final int a, final int unused);
  
  }
  </code></pre>
  
  <p>Shouldn't the <code>unused</code> parameter be ignored since there is already another one that is annotated with <code>@Payload</code>?</p>