Hello,

I have a restlet JSE server and a ServerResource that serves a resource: 


  @Get
    public ArrayList<String> retrieveObjects() {
       ArrayList<String> test = new ArrayList<String>();
       test.add("item0");
       return test;
    }

The server is using the following libraries from the 2.1RC2 restlet J2E package:

com.google.gwt.server.jar
org.codehaus.jackson.core.jar
org.codehaus.jackson.mapper.jar
org.restlet.ext.gwt.jar
org.restlet.ext.jackson.jar
or.restlet.ext.simple.jar
org.restlet.jar
org.simpleframework.jar


On the GWT client side I'm trying to request the serverResource with this code:

ObjectsResourceProxy objectsResource = GWT.create(ObjectsResourceProxy.class);
objectsResource.getClientResource().setReference("http://localhost:8111/v1/environment/objects/";);
                      
objectsResource.retrieve(new Result<ArrayList<String>>() {
                                        
@Override
public void onSuccess(ArrayList<String> result) {
// TODO Auto-generated method stub
        
                                        
}
                                        
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
   
                                }
});


When I execute the previous code on the client side of a GWT aplication, the 
server acknowledges the request:
2012-02-15      20:38:18        127.0.0.1       -       -       8111    GET     
/v1/environment/objects/        -       200     -       0       20      
http://localhost:8111   Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:10.0) 
Gecko/20100101 Firefox/10.0    
http://127.0.0.1:8888/Freedomotic_gwt_client.html?gwt.codesvr=127.0.0.1:9997

And it reach the onSucess callback. However the result variable is null always.

In the GWT aplication I have defined the following on the client.gwt.xml

 <inherits name='com.google.gwt.xml.XML'/>
  <inherits name='com.google.gwt.json.JSON'/>
  <inherits name='org.restlet.Restlet'/>
  <inherits name='org.restlet.XML'/>
  <inherits name='org.restlet.JSON'/>


And I have imported the 
org.restlet.ext.json.jar
org.restlet.ext.xml.jar
org.restlet.ext.gwt.jar
org.restlet.jar
from the restlet 2.1RC2 gwt package.

What I'm missing?

Thank you in advance.
Best regards
Gabriel

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

Reply via email to