如何在Google应用引擎RPC流中将对象作为参数传递?

时间:2010-05-27 05:42:18

标签: google-app-engine gwt-rpc

我正在构建一个非常基本的应用程序,我想要做的一件事是通过服务将对象作为参数传递 - >异步 - > impl而不是传递一百万个单独的参数。

所以在异步中,我做了类似的事情:

import shared.Profile;
...
public interface ProfileServiceAsync {
    public void addProfile(Profile inProf, AsyncCallback<Void> async);

现在,个人资料是com中的一个类。 ... .shared我在...... .gwt.xml

中有以下内容
<source path='shared'/>

当我尝试编译时,我得到了这个错误。

[ERROR] Errors in 'file:/D:/projects/eclipse/workspace/.../src/com/.../client/ProfileServiceAsync.java'
         [ERROR] Line 11: No source code is available for type shared.Profile; did you forget to inherit a required module?

有关于此的任何想法吗?

1 个答案:

答案 0 :(得分:0)

我认为你的问题来自你的导入。

这不是:


import shared.Profile;
但是:

import com. ... .shared.Profile;