Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gwt RequestFactory ValueProxy类,包含另一个ValueProxy的嵌入列表,在客户端的响应中不可见_Gwt_Requestfactory - Fatal编程技术网

Gwt RequestFactory ValueProxy类,包含另一个ValueProxy的嵌入列表,在客户端的响应中不可见

Gwt RequestFactory ValueProxy类,包含另一个ValueProxy的嵌入列表,在客户端的响应中不可见,gwt,requestfactory,Gwt,Requestfactory,我有一个requestfactory服务请求,它返回RoleProxy的列表。RoleProxy包含一个PermissionProxy列表。我可以看到从服务器返回的数据。我可以在AutoBean解码正在解析的数据中看到它。但是onSuccess方法中的响应RoleProxy的列表中没有任何数据 这是RoleProxy @ProxyForName("com.ihg.atp.schema.crs.revenue.sbrpa.datatypes.v1.RolesType") public interf

我有一个requestfactory服务请求,它返回RoleProxy的列表。RoleProxy包含一个PermissionProxy列表。我可以看到从服务器返回的数据。我可以在AutoBean解码正在解析的数据中看到它。但是onSuccess方法中的响应RoleProxy的列表中没有任何数据

这是RoleProxy

@ProxyForName("com.ihg.atp.schema.crs.revenue.sbrpa.datatypes.v1.RolesType")
public interface RoleProxy extends ValueProxy {
    public int getId();

    public void setId(final int id);

    public String getName();

    public void setName(final String name);

    public List<PermissionProxy> getPermissions();

    public void setPermissions(final List<PermissionProxy> permissions);

}
还有通话程序

RolesContext ctx = requestFactory.rolesContext();
ctx.getAllRoles().with("permissions").fire(new Receiver<List<RoleProxy>>() {
    @Override
    public void onSuccess(List<RoleProxy> response) {
        @SuppressWarnings("unused")
        List<PermissionProxy> perms = response.get(0).getPermissions();
        // Here perms is an empty list instead of the data that was sent
    }
});
有人知道这里发生了什么吗?我过去也用EntityProxies做过类似的事情


在编辑时:添加了指向的链接。

这可能看起来很傻,但是:您是否检查了getPermissions在服务器端调用时是否返回非空列表?顺便说一句,您不需要使用ValueProxy-s的withpermissions。但我确实查过了。在浏览器调试器中查看请求时,我可以看到数据,在逐步查看requestfactory请求处理程序时,我可以看到数据,直到AutoBean解码数据为止。我认为我不需要with子句,但把它放在那里,以防万一这就是告诉解码器不要给我数据的原因。托马斯,这是如何编码的?从我在文件中所看到的一切来看,我似乎应该这样做。我错过什么了吗?有没有可能是一个漏洞溜进了房间?确实有可能是一个漏洞太复杂了,到处都是小的——不是那么小的——漏洞,但我怀疑这里的情况是否如此——这看起来像是一个非常常见的用例,而且通常都能正常工作。你能给你的问题添加响应负载吗?响应主体相当大,所以我把它存储在谷歌硬盘上,并提供了一个链接。这些对象的数据字段比我的示例多几个,我的示例剪切了一些不重要的数据来说明问题。
RolesContext ctx = requestFactory.rolesContext();
ctx.getAllRoles().with("permissions").fire(new Receiver<List<RoleProxy>>() {
    @Override
    public void onSuccess(List<RoleProxy> response) {
        @SuppressWarnings("unused")
        List<PermissionProxy> perms = response.get(0).getPermissions();
        // Here perms is an empty list instead of the data that was sent
    }
});