Havanero / gwt-syncproxy

Automatically exported from code.google.com/p/gwt-syncproxy
0 stars 0 forks source link

Add support for the xsiframe linker #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Put this in your gwt.xml file to enable the cross site iframe linker:
<add-linker name="xsiframe"/>

2. Now try to invoke a service
    final SomethingAsync async = (SomethingAsync) SyncProxy.newProxyInstance(SomethingAsync.class, "http://localhost:8181/demo/", "something");

The it fails to locate the RPC policy file because it seems to be searching for 
the .html file instead:
Apr 02, 2014 10:33:30 AM com.gdevelop.gwt.syncrpc.RpcPolicyFinder 
searchPolicyFileInClassPath
WARNING: No RemoteService in the classpath
java.io.FileNotFoundException: 
http://localhost:8181/demo/86EBC63739EDC1C97035068CEB616B35.cache.html
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1623)
    at com.gdevelop.gwt.syncrpc.RpcPolicyFinder.getResposeText(RpcPolicyFinder.java:123)
    at com.gdevelop.gwt.syncrpc.RpcPolicyFinder.fetchSerializationPolicyName(RpcPolicyFinder.java:84)
    at com.gdevelop.gwt.syncrpc.SyncProxy.newProxyInstance(SyncProxy.java:236)
    at com.gdevelop.gwt.syncrpc.SyncProxy.newProxyInstance(SyncProxy.java:219)
    at com.gdevelop.gwt.syncrpc.SyncProxy.newProxyInstance(SyncProxy.java:193)
    at com.gdevelop.gwt.syncrpc.SyncProxy.newProxyInstance(SyncProxy.java:118)
    at com.acme.demo.inttest.GetRawInputTest.test(GetRawInputTest.java:42)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

What version of the product are you using? On what operating system?
GWT 2.6.0 and gwt-syncproxy 0.4.2

Original issue reported on code.google.com by david.nouls on 2 Apr 2014 at 8:35

GoogleCodeExporter commented 8 years ago
I'll add this onto the list for the next version, but I'll have to dig deeper 
into the base code to figure out how it's currently working and some testing. 
Meantime, any patches are welcome or any developers who wish to join this 
project and assist, please do so. I currently can't provide a timeline on this 
feature, but I will mark the status to Accepted if/when I can dig into it.

Original comment by p.pr...@blueesoteric.com on 2 Apr 2014 at 11:07

GoogleCodeExporter commented 8 years ago
Problem seems to be that the xsiframe linker outputs *.cache.js files whereas 
the standard linker outputs *.cache.html files, so the cache.html file 
SyncProxy is looking for simply does not exists. This is explained in more 
detail here: http://stackoverflow.com/questions/9856158/gwt-compile-to-html-file

Original comment by joergenv...@gmail.com on 12 Jun 2014 at 9:33

GoogleCodeExporter commented 8 years ago
If you configure the syncproxy to pull "*.cache.js" when "*.cache.html" is not 
found should work.

I copied my *.cache.js to *.cache.html and my test RPC worked here.

If I pull this via git, how do I compile this project against gwt as is 
mentioned on the download page to implement this?

(I am an eclipse user)

Original comment by mich...@newsrx.com on 12 Aug 2014 at 8:39

GoogleCodeExporter commented 8 years ago
@michael If you take a look at the SourceAndTesting wiki, it describes how 
you'll need to setup your workspace to compile against versions of GWT. It's a 
bit convoluted at the moment until I have time to setup either maven/gradle, 
but let me know if you run into problems with those instructions. FYI, this 
repository is still under SVN control, so you'll need to use the git-svn 
bridge, again until I have time to switch this over to Git. If you're able to 
come up with a solution, I can add you onto this project or you can submit a 
patch and I'll include it with the next version.

I'm planning on doing some update work on this project in October, so I will 
review this issue again at that time. If there have been no PR/patches, I will 
look into making the system search for the *.cache.js when *.html is not found. 
Thanks for that information 

Original comment by p.pr...@blueesoteric.com on 19 Sep 2014 at 12:34

GoogleCodeExporter commented 8 years ago
Here is my contribution. I have replaced the RpcPolicyFinder by the attached 
one and it works with XSI FrameLinker.

I have tested it with GWT 2.6.1 and Java 1.7 

Original comment by lunarjchav@gmail.com on 4 Nov 2014 at 7:20

Attachments:

GoogleCodeExporter commented 8 years ago
Thank you for the patch. I'm working on updates now, so I will test this and 
add it to the next release

Original comment by p.pr...@blueesoteric.com on 25 Dec 2014 at 2:57

GoogleCodeExporter commented 8 years ago
Issue 42 has been merged into this issue.

Original comment by p.pr...@blueesoteric.com on 25 Dec 2014 at 2:59

GoogleCodeExporter commented 8 years ago
This patch has been applied and will be release in 0.5

Original comment by p.pr...@blueesoteric.com on 3 Jan 2015 at 9:42

GoogleCodeExporter commented 8 years ago
Issue 43 has been merged into this issue.

Original comment by p.pr...@blueesoteric.com on 3 Jan 2015 at 9:46

GoogleCodeExporter commented 8 years ago
SyncProxy library version 0.5 is now available

Original comment by p.pr...@blueesoteric.com on 11 Jan 2015 at 4:32