不能验证这一方法,因为返回类型(XXXProxy)的域制图不能被解决到“再质”的域名上。
从WT开始 2.4. 要求书库接口必须经过验证,才能由请求书库服务器代码或基于证书的客户使用。 本文件解释了验证这些接口的机制。
http://code.google.com/p/google-web-toolkit/wiki/RequestFactory InterfaceValidation”rel=“nofollow”http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation
I have done but came out some error in Proxy and Request class. like that:
不能验证这一方法,因为返回类型(XXXProxy)的域制图不能被解决到“再质”的域名上。
Could not find domain method similar to java.lang.Integer countUsers()。
Help!I have passed for using Implementing a service in an entity class but can t pass Using Locator and ServiceLocator.
Mycode:
@ServiceName(value="UserProxy.class", locator="UserServiceLocator.class")
public interface UserServiceRequest extends RequestContext {
Request<Integer> countUsers();
Request<Void> generateUsers();
Request<List<UserProxy>> findAllUsers();
InstanceRequest<UserProxy, Void> persist();
InstanceRequest<UserProxy, Void> remove();
}
@ProxyForName(value = "User.class", locator = "UserLocator.class")
public interface UserProxy extends EntityProxy {
//...setter and getter
EntityProxyId<UserProxy> stableId();
}
error [debug to use method on server]
com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost 严重: Unexpected error java.lang.RuntimeException: The RequestFactory ValidationTool must be run for the com.geogre.shared.DemoRfLocateRequestFactory RequestFactory type at com.google.web.bindery.requestfactory.vm.impl.Deobfuscator$Builder.load(Deobfuscator.java:59) at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.updateDeobfuscator(ResolverServiceLayer.java:43) at com.google.web.bindery.requestfactory.server.ResolverServiceLayer.resolveRequestFactory(ResolverServiceLayer.java:176) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172) at com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.resolveRequestFactory(ServiceLayerDecorator.java:172) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.web.bindery.requestfactory.server.ServiceLayerCache.getOrCache(ServiceLayerCache.java:233) at com.google.web.bindery.requestfactory.server.ServiceLayerCache.resolveRequestFactory(ServiceLayerCache.java:198) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:207) at com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:127) at com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) Pragma: no-cache Cache-Control: no-cache Response headers Content-Type: text/html; charset=iso-8859-1 Content-Length: 1420