Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.19
-
Fix Version/s: 1.20
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Existing implementation:
/** * Utility class for getting an instance of the async interface for WelcomeService. */ public static class Util { /** * Get an instance of this async interface for WelcomeService. This method assumes the endpoint is * mounted at "http://localhost:8080/GWTpubSub/gwt/welcome". * * @return The async instance. */ public static WelcomeServiceAsync getInstance() { return getInstance("http://localhost:8080/GWTpubSub/gwt/welcome"); } /** * Get an instance of this async interface for WelcomeService. * * @param url The url where the remote endpoint is mounted. * @return The async instance. */ public static WelcomeServiceAsync getInstance(String url) { WelcomeServiceAsync asyncInstance = (WelcomeServiceAsync) com.google.gwt.core.client.GWT.create(WelcomeService.class); ((com.google.gwt.user.client.rpc.ServiceDefTarget) asyncInstance).setServiceEntryPoint(url); return asyncInstance; } }
potential change:
/** * Utility class for getting an instance of the async interface for WelcomeService. */ public static class Util { /** * Get an instance of this async interface for WelcomeService. This method assumes the endpoint is * mounted at "http://localhost:8080/GWTpubSub/gwt/welcome". * * @return The async instance. */ public static WelcomeServiceAsync getInstance() { /* ** Get URL for module */ String url = com.google.gwt.core.client.GWT.getModuleBaseURL(); /* ** Split off first part including server and port */ String urlSplit[] = url.split("http://\\w+:\\d+/"); /* ** Construct end point */ return getInstance(urlSplit[0]+"/GWTpubSub/gwt/welcome"); } /** * Get an instance of this async interface for WelcomeService. * * @param url The url where the remote endpoint is mounted. * @return The async instance. */ public static WelcomeServiceAsync getInstance(String url) { WelcomeServiceAsync asyncInstance = (WelcomeServiceAsync) com.google.gwt.core.client.GWT.create(WelcomeService.class); ((com.google.gwt.user.client.rpc.ServiceDefTarget) asyncInstance).setServiceEntryPoint(url); return asyncInstance; } }
Activity
Ryan Heaton
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Ryan Heaton
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |