title: RestyGWT content argument must be a class
body: <p>I'm trying to have a server-client communication by using <a href="http://restygwt.fusesource.org/" rel="nofollow">restygwt</a>. Therefore I'm having an service interface (client) and a controller (server).</p>
  
  <pre><code>@Path("/user")
  public interface UserAdminRestService extends RestService {
      @GET
      @Path("/users")
      @Produces(MediaType.APPLICATION_JSON)
      @Consumes(MediaType.APPLICATION_JSON)
      public void getUsers(MethodCallback&lt;List&lt;GWTUser&gt;&gt; methodCallback);
  
  @GET
  @Path("/{id}")
  @Produces(MediaType.APPLICATION_JSON)
  @Consumes(MediaType.APPLICATION_JSON)
  public void getUser(Integer id, MethodCallback&lt;GWTUser&gt; callback);
   }
  
  @Controller
  @RequestMapping(value ="/user")
  public class AdminSpringController {
  
      @RequestMapping(value = "/users", method = RequestMethod.GET)
      @ResponseStatus(HttpStatus.OK)
      public @ResponseBody List&lt;GWTUser&gt; getUsers() {
          ...
      }
  
  @RequestMapping( value = "/{id}", method = RequestMethod.GET)
  @ResponseStatus(HttpStatus.OK)
  public @ResponseBody GWTUser getUser(@PathVariable Integer id) throws NotFoundException { ...
      }
  
  }
  </code></pre>
  
  <p>To get the specific data I make a MethodCall:</p>
  
  <pre><code>Defaults.setServiceRoot(GWT.getHostPageBaseURL());
  UserAdminRestService userService = GWT.create(UserAdminRestService.class);
  ((RestServiceProxy)userService).setResource(new Resource("/user"));
  
  
  userServiceClient.getUsers(new MethodCallback&lt;List&lt;GWTUser&gt;&gt;() {
  
      @Override
      public void onFailure(Method method, Throwable exception) {
          // TODO Auto-generated method stub
  
      }
  
      @Override
      public void onSuccess(Method method, List&lt;GWTUser&gt; response) {
          view.setUserList(response);
  
      }
  
  });
  </code></pre>
  
  <p>But when I try to build my application I'm getting the error message:</p>
  
  <pre><code>[INFO] Compiling module my.app.web
  [INFO]    Computing all possible rebind results for 'my.app.client.UserAdminRestService'
  [INFO]       Rebinding my.app.client.UserAdminRestService
  [INFO]          Invoking generator org.fusesource.restygwt.rebind.RestServiceGenerator
  [INFO]             Generating: my.app.client.UserAdminRestService_Generated_RestServiceProxy_
  [INFO]                [ERROR] Content argument must be a class.
  [INFO]    [ERROR] Errors in 'my/app/admin/client/activity/UserListActivity.java'
  [INFO]       [ERROR] Line 69: Failed to resolve 'my.app.client.UserAdminRestService' via deferred binding
  [INFO]    [WARN] For the following type(s), generated source was never committed (did you forget to call commit()?)
  [INFO]       [WARN] my.app.client.UserAdminRestService_Generated_RestServiceProxy_
  </code></pre>
  
  <p>LINE 69: is <code>UserAdminRestService userService = GWT.create(UserAdminRestService.class);</code></p>
  
  <p>I have no clue what I'm doing wrong. thanks for any ideas or help :)</p>
  
  <p>EDIT:</p>
  
  <p>GWTUser</p>
  
  <p>public class GWTUser {</p>
  
  <pre><code>/**
   * Certain user entity id. Only for representation, can not be
   * persisted into the database.
   */
  private int id;
  
  /**
   * Certain user id.
   */
  private String userId;
  
  /**
   * user password.
   */
  private String password;
  
  /**
   * Represents a certain status if user is enabled.
   */
  private boolean enabled = true;
  
  /**
   * Represents a certain status if user is locked.
   */
  private boolean locked = false;
  
  /**
   * user e-mail.
   */
  private String email;
  
  /**
   * full user name.
   */
  private String name;
  
  /**
   * the version of the real user entity. Only for representation, can not be
   * persisted into the database.
   */
  private int version;
  
  // Getter and Setter
  
  public int getId() {
      return id;
  }
  
  public void setId(int id) {
      this.id = id;
  }
  
  public int getVersion() {
      return version;
  }
  
  public void setVersion(int version) {
      this.version = version;
  }
  
  public String getUserId() {
      return userId;
  }
  
  public void setUserId(String userId) {
      this.userId = userId;
  }
  
  public String getPassword() {
      return password;
  }
  
  public void setPassword(String password) {
      this.password = password;
  }
  
  public boolean isEnabled() {
      return enabled;
  }
  
  public void setEnabled(boolean enabled) {
      this.enabled = enabled;
  }
  
  public boolean isLocked() {
      return locked;
  }
  
  public void setLocked(boolean locked) {
      this.locked = locked;
  }
  
  public String getEmail() {
      return email;
  }
  
  public void setEmail(String email) {
      this.email = email;
  }
  
  public String getName() {
      return name;
  }
  
  public void setName(String name) {
      this.name = name;
  }
  
  @Override
  public int hashCode() {
      final int prime = 31;
      int result = 1;
      result = prime * result + ((userId == null) ? 0 : userId.hashCode());
      return result;
  }
  
  @Override
  public boolean equals(Object obj) {
      if (this == obj)
          return true;
      if (obj == null)
          return false;
      if (getClass() != obj.getClass())
          return false;
      GWTUser other = (GWTUser) obj;
      if (userId == null) {
          if (other.userId != null)
              return false;
      } else if (!userId.equals(other.userId))
          return false;
      return true;
  }
  
  @Override
  public String toString() {
      StringBuilder builder = new StringBuilder();
      builder.append("User [userId=");
      builder.append(userId);
      builder.append(", name=");
      builder.append(name);
      builder.append(", email=");
      builder.append(email);
      builder.append(", password=");
      builder.append(password != null ? "****" : "&lt;not set&gt;");
      builder.append(", enabled=");
      builder.append(enabled);
      builder.append(", locked=");
      builder.append(locked);
      builder.append("]");
      return builder.toString();
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>EDIT:</strong></p>
  
  <pre><code>gwt.gwt.xml file containing all the gwt code:
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE module SYSTEM "gwt-module.dtd"&gt;
  &lt;module&gt;
  
      &lt;!-- Inherit the core Web Toolkit stuff. --&gt;
      &lt;inherits name='com.google.gwt.user.User' /&gt;
      &lt;inherits name='com.google.gwt.activity.Activity'/&gt;
      &lt;inherits name='com.google.gwt.place.Place' /&gt;
      &lt;inherits name='org.fusesource.restygwt.RestyGWT' /&gt;
  
      &lt;!-- Use ClientFactoryImpl by default --&gt;
      &lt;replace-with class="my.app.client.factory.ClientFactoryImpl"&gt;
      &lt;when-type-is class="my.app.client.factory.ClientFactory"/&gt;
      &lt;/replace-with&gt;
  
      &lt;!--Specify the app entry point class. --&gt;
      &lt;entry-point class='my.app.client.AdminEntryPoint'/&gt;    
  
      &lt;source path='rest'/&gt;
      &lt;source path='client'/&gt;
      &lt;source path='consts'/&gt; 
  &lt;/module&gt;
  </code></pre>
  
  <p>and the web.gwt.xml file: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE module SYSTEM "gwt-module.dtd"&gt;
  &lt;module rename-to="web"&gt;
  
      &lt;!-- Inherit the core Web Toolkit stuff. --&gt;
      &lt;inherits name='com.google.gwt.user.User' /&gt;
      &lt;inherits name='org.fusesource.restygwt.RestyGWT' /&gt;
  
      &lt;inherits name='my.app.gwt' /&gt; 
  
  &lt;/module&gt;
  </code></pre>
  
  <p>I thinks because of two modules there is a problem because both the Interface <code>UserAdminRestService</code> and the <code>GWTUser</code> are still the same.  </p>