本文介绍了GWT通过RPC发送对象类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试这样做
服务接口:
Boolean SaveObjectIntoDatabase(Object Entity);
ServiceAsync:
ServiceAsync:
void SaveObjectIntoDatabase(Object Entity,AsyncCallback <Boolean> Callback);
然后在serviceimpl上实现它
then implementing it on the serviceimpl
没有成功.
是不能通过GWT RPC发送类型为object的变量吗?
Is it that we cannot send a variable of type object via GWT RPC??
堆栈跟踪:
onModuleLoad() threw an exception
Exception while loading module com.BiddingSystem.client.BiddingSystem. See Development Mode for details.
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.BiddingSystem.client.Service' (did you forget to inherit a required module?) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53) at com.google.gwt.core.client.GWT.create(GWT.java:97) at com.BiddingSystem.client.BiddingSystem.onModuleLoad(BiddingSystem.java:63) ... 9 more Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) ... 11 more
推荐答案
使对象类本身实现可序列化接口
make the object class itself implmenets serialisable interface
这篇关于GWT通过RPC发送对象类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!