I have this ServerResource that is called by a ClientProxy:
public class GaeThingServerResource extends SelfInjectingServerResource
implements ThingResource {
private static final Logger LOG
= Logger.getLogger(GaeThingServerResource.class.getName());
@Override
public ThingItem createThing(ThingItem Thing) {
store().put(Thing);
return Thing;
}
@Override
public ThingItem readThing(Long id) {
LOG.info("Read Thing id=" + id);
ThingItem result = store().get(ThingItem.class, id);
return result;
}
@Override
public ThingItem updateThing(ThingItem Thing) {
LOG.info("Updating Thing=" + Thing.toString());
store().put(Thing);
return Thing;
}
@Override
public void deleteThing(Long id) {
LOG.info("Delete Thing id=" + id);
store().delete(ThingItem.class, id);
}
}
This is called by:
public interface ThingResourceProxy extends ClientProxy {
@Get
public void readThing(Long id, Result<ThingItem> callback);
@Delete
public void deleteThing(Long id, Result<Void> callback);
@Post
public void createThing(ThingItem thing, Result<ThingItem> callback);
@Put
public void updateThing(ThingItem thing, Result<ThingItem> callback);
@Get
public void list(Result<ThingResultItem> callback);
}
With this code:
ThingResourceProxy thingResource =
GWT.create(ThingResourceProxy.class);
thingResource.getClientResource().setReference("/rest/thing/" + id);
thingResource.readThing(id, new Result<ThingItem>() {
//...
};
However readThing method the Long id is always null, when is called,
what could be the problem?
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3094183