google-code-export / gwt-test-utils

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

XSRF Token RPC service fails. #92

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to use the XSRFTokenService from gwt with gwt-test-utils

com.octo.gwt.test.exceptions.GwtTestRpcException: Cannot find the 
'@RemoteServiceRelativePath' annotation on RemoteService interface 
'com.google.gwt.user.client.rpc.XsrfTokenService'
    at com.octo.gwt.test.server.RemoteServiceCreateHandler.getRemoveServiceRelativePath(RemoteServiceCreateHandler.java:142)
    at com.octo.gwt.test.server.RemoteServiceCreateHandler.create(RemoteServiceCreateHandler.java:77)
    at com.octo.gwt.test.internal.patchers.GwtPatcher.create(GwtPatcher.java:22)
    at com.google.gwt.core.client.GWT.create(GWT.java)
    at org.xva.client.services.BaseXSRFCallBack.<init>(BaseXSRFCallBack.java:16)
    at org.xva.client.services.useradmin.UserAdminServiceCallback.<init>(UserAdminServiceCallback.java:17)
    at org.xva.client.services.useradmin.UserAdminServiceCallback.getInstance(UserAdminServiceCallback.java:24)
    at org.xva.client.user.administration.UserAdministrationActivity.<init>(UserAdministrationActivity.java:27)
    at org.xva.UserAdministrationActivityTest.test(UserAdministrationActivityTest.java:24)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at com.octo.gwt.test.internal.runner.AbstractGwtRunner.run(AbstractGwtRunner.java:40)
    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)

Original issue reported on code.google.com by Klose...@gmail.com on 16 Nov 2011 at 1:27

GoogleCodeExporter commented 9 years ago
I will fix it ASAP (I didn't know this service)

Original comment by gael.laz...@gmail.com on 16 Nov 2011 at 1:42

GoogleCodeExporter commented 9 years ago
As first attempt , you may delegate the secured rpc call to the inner rpc call, 
without checking the cookie, etc.
(http://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideSecurityRpcXsrf
.html) 

Original comment by Klose...@gmail.com on 16 Nov 2011 at 2:22