Saturday, December 24, 2016

Requestfactory: How to build ValueProxy

Hi everyone,

On the server-side I have an interface lets call it "CommonInterface". There are some subinterfaces and various implementations.

Now the client should be able to create objects that fit the "CommonInterface" and send it to the server. However there is a wrapperClass around that holds CommonInterface as a member.
The Request should look like this:

@Service(value = MyService.class, locator = MyServiceLocator.class)
public interface MyServiceRequest extends RequestContext{

    Request<Void> findAll(ObjectThatHasCommonInterfaceAsMemberProxy myObject);


Lets asume I want the client to send SubSub-CommonInterfaceImpl implementation. Which proxies do I need then on the client?

Server                                             Client
CommonInterface                               ? Create a proxy that maps to the interface ?      (No Implementation on the server, just Interface)
Sub-CommonInterface                        ? Create a proxy that maps to the interface ?      (No Implementation on the server, just Interface)
SubSub-CommonInterface                  ? Create a proxy that maps to the interface ?
SubSub-CommonInterfaceImpl            SubSub-CommonInterfaceImplProxy

However I already tried to implement it in various ways but couldnt get it working. Currently I have 2 proxies (CommonInterfaceProxy and SubSub-CommonInterfaceImplProxy that extends CommonInterfaceProxy). Im able to create instance of both of the proxies, but whenever I call objectThatHasCommonInterfaceAsMemberProxy.setCommonInterface(obj) I get an illegal argument exception.

Your help is much appreciated.

Thanks in advance.
Kind regards,

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment