Client and server code cannot be deployed under different base paths
Closed this issue · 4 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Deploy a GWT project where the client-side code is accessed via a different
base URL than the server-side code
2. Invoke any SyncProxy factory method
What is the expected output? What do you see instead?
The expected output would simply be a successful connection. Instead,
gwt-syncproxy throws a FileNotFound exception
that looks something like this:
java.io.FileNotFoundException: http://HOSTNAME/CLIENT/dispatch
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1434)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at com.gdevelop.gwt.syncrpc.RemoteServiceSyncProxy.doInvoke(RemoteServiceSyncProxy.java:160)
What version of the product are you using? On what operating system?
0.3, Windows
Please provide any additional information below.
The gwt-syncproxy library assumes the client-side code deploys under the same
path as the server-side, so it expects to find the dispatch servlet on the same
path. It should be able to support them under different paths, however. The
hostname and the port are the same, so there is no same origin problem.
Original issue reported on code.google.com by codespel...@gmail.com
on 3 Apr 2013 at 9:38
GoogleCodeExporter commented
[deleted comment]
GoogleCodeExporter commented
We solve this problem by simply creating a new factory method that accepts
different paths for each part of the application. It uses the client path
(moduleBaseURL) to load the serialization policy, but the server path to create
the remote service handler.
See the attached patch.
Original comment by codespel...@gmail.com
on 4 Apr 2013 at 2:05
Attachments:
GoogleCodeExporter commented
This will be added to the 0.4 release.
Original comment by p.pr...@blueesoteric.com
on 5 Apr 2013 at 7:55
- Changed state: Accepted
GoogleCodeExporter commented
Patch has been applied to the android dev branch containing the updated
gwt-syncproxy structure. patch will be released in the jar when issue 3 is
completed as version 0.4
Original comment by p.pr...@blueesoteric.com
on 6 May 2013 at 12:27
- Changed state: Fixed