I got an error when I request resources from GWT client when using Collection 
as a parmeter (Using Class is fine) in my project.

Then I modified the sample code (org.restlet.example.gae.serialization) and got 
the same error.
Here is the sample code link: 
http://wiki.restlet.org/docs_2.0/13-restlet/21-restlet/318-restlet/303-restlet.html

For example:
public interface ContactResourceProxy extends ClientProxy {
    @Get
    public void retrieve(Result<Contact> callback);
 
    @Put
    public void store(Contact contact, Result<Void> callback);
 
    @Delete
    public void remove(Result<Void> callback);
}

I changed to:
public interface ContactResourceProxy extends ClientProxy {
    @Get
    public void retrieve(Result<ArrayList<Contact>> result);

    @Put
    public void store(ArrayList<Contact> contact, Result<Void> callback);

    @Delete
    public void remove(Result<Void> callback);

}

The @Get is working fine, but the @Put is not.

Here is the error log:
15:41:23.830 [DEBUG] [org_restlet_example_gae_serialization] Rebinding 
org.restlet.example.gae.serialization.client.ContactResourceProxy
15:41:23.836 [DEBUG] [org_restlet_example_gae_serialization] Adding '6' new 
generated units
15:41:23.839 [DEBUG] [org_restlet_example_gae_serialization] Validating newly 
compiled units
15:41:23.840 [ERROR] [org_restlet_example_gae_serialization] Errors in 
'generated://73D23914D367F6E527CE9A78CDE16916/org/restlet/example/gae/serialization/client/ContactResourceProxyProxy.java'
15:41:23.884 [ERROR] [org_restlet_example_gae_serialization] Line 19: The type 
ContactResourceProxyProxy must implement the inherited abstract method 
ContactResourceProxy.store(ArrayList<Contact>, Result<Void>)
15:41:23.944 [ERROR] [org_restlet_example_gae_serialization] Line 45: Name 
clash: The method store(ArrayList, Result<Void>) of type 
ContactResourceProxyProxy has the same erasure as store(ArrayList<Contact>, 
Result<Void>) of type ContactResourceProxy but does not override it

I opened the snapshot of ContactResourceProxyProxy
The code in line 45 is:
public void store(java.util.ArrayList param1, final 
org.restlet.client.resource.Result<java.lang.Void> callback)

It didn't pass the Contract.

Could anyone help me to take a look at this issue? Any help is appreciated!

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2675190

Reply via email to