And why not in this way?
WidgetInterfaceAsync widgetInterface1 = (WidgetInterfaceAsync)
GWT.create(WidgetInterface.class);
ServiceDefTarget endpoint = (ServiceDefTarget) widgetInterface1;
endpoint.setServiceEntryPoint("/service1);
WidgetInterfaceAsync widgetInterface2 = (WidgetInterfaceAsync)
GWT.create(WidgetInterface.class);
ServiceDefTarget endpoint = (ServiceDefTarget) widgetInterface2;
endpoint.setServiceEntryPoint("/service2);
Peter
On 26. Júl, 20:04 h., Vinicius Carvalho <[email protected]>
wrote:
> I'm still looking for a solution for this.
>
> My problem, is that I'm creating a widget, and that widget relies on a
> remoteservice. But I have different service implementations, that must
> implement the same interface. One way I found of doiing this is having
> 2 interfaces that extend the same interface for instance:
>
> MyRemoteService1 extends WidgetInterface
>
> MyRemoteService2 extends WidgetInterface
>
> When using the widget, I pass the constructed service to its
> constructor:
>
> MyWidget m = new MyWidget(GWT.create(MyRemoteService1);
> MyWidget m2 = new MyWidget(GWT.create(MyRemoteService2);
>
> The problem with this, is that the view that contains my widget is
> going to have a dependency with the widget's service, and that should
> be bound only to it.
>
> So is there any way, to have several implementations of same interface
> to create a GWT service RPC?
>
> Regards
>
> On Jul 26, 12:59 pm, Vinicius Carvalho <[email protected]>
> wrote:
>
> > Hi there!
>
> > Since GWT creates the binding with the server using:
>
> > GWT.create(Interface)
>
> > What if I have several services implementations for the same
> > interface? Is it possible to handle?
>
> > Regards
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.