Thanks
Mike
Yes I would like to communicate GWT/SWING client to the same server
instance.
So right now I have something like this.
public interface Resourcer extends RemoteService
{
StringResource getResourcesFor(String sResourceName);
public static class App
{
private static ResourcerAsync ourInstance = null;
public static synchronized ResourcerAsync getInstance()
{
if(ourInstance == null)
{
ourInstance = (ResourcerAsync)GWT.create(Resourcer.class);
((ServiceDefTarget)ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL()
+ "GwtUI_Resourcer");
}
return ourInstance;
}
}
}
I call StringResource sRes = App.getInstance.getResourceFor("",
myJSCallBack); I'd like to be able to do the same thing in my Swing
app, use the existing code, where GWT.getModuleBaseURL() would be
preconfigured at startup and from my Swing app I could make the same
call but provide a different callback for my swing application,
StringResource sRes = App.getInstance.getResourceFor("",
mySwingCallBack);. This would allow me to use my existing GWT-RPC
interfaces and not have to create new ones. But this code gets compiled
to Javascript.
I agree that I should be able to do it, but I think I need the proper
serialization of method calls and returned objects in order for this to
work properly. Just wondering if anyone had done this, or if GWT
supports it natively out of the box.
IE:
GWT Client (browser) -> GWT-RPC on server -> backend business logic.
SWING Client -> GWT-RPC on server -> backend business logic.
Thanks Mike
> --------------------------------
> Spam/Virus scanning by CanIt Pro
>
> For more information see
> http://www.kgbinternet.com/SpamFilter.htm
>
> To control your spam filter, log in at
> http://filter.kgbinternet.com
>
>
>
Yes my GWT service is just a bridge to the business logic and I know I
could use RMI, or CORBA or WebServices or ...
But I already have a GWT-RPC over HTTP, why should I need another
interface? Clients don't normally like to open up extra ports on their
network just for the RMI App and besides port 80 is already open.
I'd really like to have my java client, use the GWT.create(...) method
and have it return a version of of object that when the method invoked,
serializes the request to GWT-RPC, sets up an appropriate mechanism for
the response and deserialize the response into my java object and make
the callback to my callback handler.
I'd even be happy for the GWT classes that can serialize the request and
deserialize the response objects correctly.
If anyone has done this I'd sure appreciate a response.
Mike Wannamaker
Mike Wannamaker