title: DWR : Failed to load resource: resources/dwr/call/plaincall/__System.generateId.dwr
body: <p>my purpose is to execute a simple dwr function that returns a string.</p>
  
  <p>Spring version <code>4.3.5.RELEASE</code>
  Spring security version <code>4.1.4.RELEASE</code>
  dwr version <code>3.0.0-RELEASE.</code></p>
  
  <p>I'm using Java based config. I have correctly generated all of the 3 necessaries JS files:</p>
  
  <pre><code>engine.js
  util.js
  interface/myDwr.js
  </code></pre>
  
  <p>I can see the 3 generated files in the browser when the application runs locally. </p>
  
  <p>The problem appears when i try to execute a very simple function marked as <code>@RemoteMethod</code> in the class marked as <code>@RemoteProxy(name="ajaxController")</code></p>
  
  <p>All i get from the browser is: </p>
  
  <pre><code> Failed to load resource: the server responded with a status of 405 (Method Not 
   Allowed)  resources/dwr/call/plaincall/__System.generateId.dwr 
  </code></pre>
  
  <p>In Debug mode i can see that my @RemoteMethod is not getting called.</p>
  
  <p>The method is called testDWR:</p>
  
  <pre><code>@RemoteProxy(name="ajaxController")
  public class DWRFunctions {
      @RemoteMethod
      public String testDWR(String s) {
          return "Hello Mr/Mrs "+s;
      }
  }
  </code></pre>
  
  <p>The Javascript function that calls it is:</p>
  
  <pre><code> function testDWR() {
      ajaxController.testDWR("Franklin", function (data) {
          alert(data);
      });
  }
  </code></pre>
  
  <p>The javascript is triggered by a simple html button:</p>
  
  <pre><code>&lt;button onclick="testDWR()"&gt;TEST DWR&lt;/button&gt;
  </code></pre>