/* DO NOT EDIT: File is auto-generated */
package <%= data_module.gwt.gin_package %>;

<%= description_javadoc_for(data_module, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public class <%= data_module.gwt.gin_module_name %>
  extends com.google.gwt.inject.client.AbstractGinModule
{
  private static com.google.gwt.user.client.rpc.XsrfToken _xsrfToken;

  public static com.google.gwt.user.client.rpc.XsrfToken getXsrfToken()
  {
    return _xsrfToken;
  }

  public static void setXsrfToken( final com.google.gwt.user.client.rpc.XsrfToken xsrfToken )
  {
    _xsrfToken = xsrfToken;
  }

  @Override
  protected void configure()
  {
  }

<%
   data_module.services.each do |service|
%>
  @com.google.inject.Provides
  @javax.inject.Singleton
  public <%= service.gwt.qualified_async_service_name %> getContactsService()
  {
    final <%= service.gwt.qualified_async_service_name %> service = com.google.gwt.core.client.GWT.create( <%= service.gwt.qualified_service_name %>.class );
<% if service.gwt.xsrf_protected? %>
    ( (com.google.gwt.user.client.rpc.HasRpcToken) service ).setRpcToken( getXsrfToken() );
<% end %>
    return service;
  }
<%
  end
%>}

/* DO NOT EDIT: File is auto-generated */
package <%= data_module.gwt.gin_package %>;

<%= description_javadoc_for(data_module, "") %>@javax.annotation.Generated( "Domgen" )
@SuppressWarnings( { "UnusedDeclaration", "JavaDoc" } )
public class <%= data_module.gwt.gin_module_name %>
  extends com.google.gwt.inject.client.AbstractGinModule
{
  private static com.google.gwt.user.client.rpc.XsrfToken _xsrfToken;

  public static com.google.gwt.user.client.rpc.XsrfToken getXsrfToken()
  {
    return _xsrfToken;
  }

  public static void setXsrfToken( final com.google.gwt.user.client.rpc.XsrfToken xsrfToken )
  {
    _xsrfToken = xsrfToken;
  }

  @Override
  protected void configure()
  {
  }

<%
   data_module.services.each do |service|
%>
  @com.google.inject.Provides
  @javax.inject.Singleton
  public <%= service.gwt.qualified_async_service_name %> get<%= service.name %>()
  {
    final <%= service.gwt.qualified_async_service_name %> service = com.google.gwt.core.client.GWT.create( <%= service.gwt.qualified_service_name %>.class );
<% if service.gwt.xsrf_protected? %>
    ( (com.google.gwt.user.client.rpc.HasRpcToken) service ).setRpcToken( getXsrfToken() );
<% end %>
    return service;
  }
<%
  end
%>}

Make sure that the name of method to get service matches the service name
Make sure that the name of method to get service matches the service name
