• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot use rename-to in RPC

 
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
in the module file, I set


and in service, I write the annotation
@RemoteServiceRelativePath("search")

then in web.xml, I write


but when I call the service, error thrown,
if in web.xml, I write

then the RPC can be successfully called!!
GWT.getModuleBaseURL() return "http://127.0.0.1:8888/com.ha.als.ALS/"
why /abc/search will fail to call the RPC as I already rename the module to "abc" in module file(ALS.gwt.xml)?

To show the debug message, I code onFailure method as follow:


and the output is


[WARN] 404 - POST /com.ha.als.ALS/search (127.0.0.1) 1407 bytes
Request headers
Accept: */*
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)
Accept-Encoding: gzip, deflate
Host: 127.0.0.1:8888
Connection: Keep-Alive
Referer: http://127.0.0.1:8888/ALS.html?gwt.codesvr=127.0.0.1:9997
x-gwt-module-base: http://127.0.0.1:8888/com.ha.als.ALS/
Content-Type: text/x-gwt-rpc; charset=utf-8
x-gwt-permutation: HostedMode
Content-Length: 269
Cache-Control: no-cache
Response headers
Content-Type: text/html; charset=iso-8859-1
Content-Length: 1407
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:209)
com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
com.google.gwt.core.client.impl.Impl.apply(Impl.java)
com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
java.lang.Thread.run(Thread.java:662)



Also, even I use

there is a warning message in eclipse as follow


[WARN] Server class 'javax.validation.Path' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/D:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r36/gwt-2.4.0/validation-api-1.0.0.GA.jar' to the web app classpath for this session
For additional info see: file:/D:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r36/gwt-2.4.0/doc/helpInfo/webAppClassPath.html
[WARN] Server class 'com.google.gwt.core.client.GWTBridge' could not be found in the web app, but was found on the system classpath
[WARN] Adding classpath entry 'file:/D:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r36/gwt-2.4.0/gwt-dev.jar' to the web app classpath for this session
For additional info see: file:/D:/eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201201120043-rel-r36/gwt-2.4.0/doc/helpInfo/webAppClassPath.html

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic