Thank you, that worked.

On Fri, Oct 30, 2009 at 3:28 PM, nicolas de loof
<[email protected]> wrote:
> If you manually create the Async interface you must disable the
> generateAsync goal in the plugin configuration
>
> 2009/10/30 Ivan Martinez <[email protected]>
>>
>> Hello all,
>> I have a GWT service with the following interface:
>>
>>
>> package es.mycompany.myapp.client;
>>
>> import java.util.Date;
>>
>> import es.mycompany.myapp.client.modelo.Area;
>> import es.mycompany.myapp.client.modelo.ComercialCorporate;
>> import es.mycompany.myapp.client.modelo.Tienda;
>> import com.google.gwt.user.client.rpc.AsyncCallback;
>>
>> public interface DirectorioTiendasServiceAsync {
>>
>>        public void areas(Date fecha, AsyncCallback<Area[]> callback);
>>
>>        public void tiendas(Date fecha, AsyncCallback<Tienda[]> callback);
>>
>>        public void comercialesCorporate(Date fecha,
>> AsyncCallback<ComercialCorporate[]> callback);
>> }
>>
>>
>> Compiling with org.codehaus.mojo:gwt-maven-plugin:1.0:compile works
>> fine, but when I try to do a Maven package I get:
>>
>> D:\Documents and Settings\martini06\Mis documentos\Mis proyectos\DT\3
>> -
>> Construcción\myapp\src\main\java\es\mycompany\myapp\client\DirectorioTiendasServiceAsync.java:[11,7]
>> duplicate class:
>> es.mycompany.myapp.client.DirectorioTiendasServiceAsync
>>
>> D:\Documents and Settings\martini06\Mis documentos\Mis proyectos\DT\3
>> -
>> Construcción\myapp\src\main\java\es\mycompany\myapp\client\paneles\TablaAreas.java:[62,36]
>>
>> areas(java.util.Date,com.google.gwt.user.client.rpc.AsyncCallback<es.mycompany.myapp.client.modelo.Area>)
>> in es.mycompany.myapp.client.DirectorioTiendasServiceAsync cannot be
>> applied to
>> (java.util.Date,com.google.gwt.user.client.rpc.AsyncCallback<es.mycompany.myapp.client.modelo.Area[]>)
>>
>> D:\Documents and Settings\martini06\Mis documentos\Mis proyectos\DT\3
>> -
>> Construcción\myapp\src\main\java\es\mycompany\myapp\client\paneles\TablaTiendas.java:[90,36]
>>
>> tiendas(java.util.Date,com.google.gwt.user.client.rpc.AsyncCallback<es.mycompany.myapp.client.modelo.Tienda>)
>> in es.mycompany.myapp.client.DirectorioTiendasServiceAsync cannot be
>> applied to
>> (java.util.Date,com.google.gwt.user.client.rpc.AsyncCallback<es.mycompany.myapp.client.modelo.Tienda[]>)
>>
>> D:\Documents and Settings\martini06\Mis documentos\Mis proyectos\DT\3
>> -
>> Construcción\myapp\src\main\java\es\mycompany\myapp\client\paneles\TablaComercialesCorporate.java:[67,36]
>>
>> comercialesCorporate(java.util.Date,com.google.gwt.user.client.rpc.AsyncCallback<es.mycompany.myapp.client.modelo.ComercialCorporate>)
>> in es.mycompany.myapp.client.DirectorioTiendasServiceAsync cannot be
>> applied to
>> (java.util.Date,com.google.gwt.user.client.rpc.AsyncCallback<es.mycompany.myapp.client.modelo.ComercialCorporate[]>)
>>
>>
>> I have found that the definition of DirectorioTiendasServiceAsync in
>> target/generated-sources... is as follows:
>>
>>
>> package es.mycompany.myapp.client;
>>
>> import java.util.Date;
>> import com.google.gwt.core.client.GWT;
>> import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
>> import com.google.gwt.user.client.rpc.ServiceDefTarget;
>> import es.mycompany.myapp.client.modelo.Area;
>> import es.mycompany.myapp.client.modelo.ComercialCorporate;
>> import es.mycompany.myapp.client.modelo.Tienda;
>> import com.google.gwt.core.client.GWT;
>> import com.google.gwt.user.client.rpc.AsyncCallback;
>> import com.google.gwt.user.client.rpc.ServiceDefTarget;
>>
>> public interface DirectorioTiendasServiceAsync
>> {
>>
>>    /**
>>     * GWT-RPC service  asynchronous (client-side) interface
>>     * @see es.mycompany.myapp.client.DirectorioTiendasService
>>     */
>>    void areas( java.util.Date fecha, AsyncCallback<Area> callback );
>>
>>    /**
>>     * GWT-RPC service  asynchronous (client-side) interface
>>     * @see es.mycompany.myapp.client.DirectorioTiendasService
>>     */
>>    void tiendas( java.util.Date fecha, AsyncCallback<Tienda> callback );
>>
>>    /**
>>     * GWT-RPC service  asynchronous (client-side) interface
>>     * @see es.mycompany.myapp.client.DirectorioTiendasService
>>     */
>>    void comercialesCorporate( java.util.Date fecha,
>> AsyncCallback<ComercialCorporate> callback );
>>
>>    /**
>>     * Utility class to get the RPC Async interface from client-side code
>>     */
>>    public static class Util
>>    {
>>        private static DirectorioTiendasServiceAsync instance;
>>
>>        public static DirectorioTiendasServiceAsync getInstance()
>>        {
>>            if ( instance == null )
>>            {
>>                instance = (DirectorioTiendasServiceAsync) GWT.create(
>> DirectorioTiendasService.class );
>>                ServiceDefTarget target = (ServiceDefTarget) instance;
>>                target.setServiceEntryPoint( GWT.getModuleBaseURL() +
>> "DirectorioTiendasService" );
>>            }
>>            return instance;
>>        }
>>    }
>> }
>>
>>
>> I think the cause of the problem is the mismatch in the definition of
>> the methods in both versions of DirectorioTiendasServiceAsync, the
>> original one has arrays and the generated one is missing them. The
>> weird thing is I had this problem before, then I don't know what I did
>> but it disappeared, and again I don't know why it is here again. Does
>> anyone know what the problem can be?. Thank you.
>> Iván Martínez
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to